Big Integer.Clamp Method
Constrains a value to the inclusive range defined by a minimum and maximum.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
C#
min if value is less than it; max if the value is greater than it; otherwise, value.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
public static BigInteger Clamp(
BigInteger value,
BigInteger min,
BigInteger max
)Parameters
- value BigInteger
- The value to constrain.
- min BigInteger
- The inclusive minimum.
- max BigInteger
- The inclusive maximum.
Return Value
BigIntegermin if value is less than it; max if the value is greater than it; otherwise, value.