Big Integer.Clamp Method
Clamps a value to an inclusive minimum and maximum value.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
The result of clamping value to the inclusive range of min and max.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
public static BigInteger Clamp(
BigInteger value,
BigInteger min,
BigInteger max
)
Parameters
- value BigInteger
- The value to clamp.
- min BigInteger
- The inclusive minimum to which value should clamp.
- max BigInteger
- The inclusive maximum to which value should clamp.
Return Value
BigIntegerThe result of clamping value to the inclusive range of min and max.
Implements
INumber<TSelf>.Clamp(TSelf, TSelf, TSelf)Exceptions
Argument | min is greater than max. |