BigInteger.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#
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

BigInteger
The result of clamping value to the inclusive range of min and max.

Implements

INumber<TSelf>.Clamp(TSelf, TSelf, TSelf)

Exceptions

ArgumentExceptionmin is greater than max.

See Also