Quad.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 Quad Clamp(
	Quad value,
	Quad min,
	Quad max
)

Parameters

value  Quad
The value to clamp.
min  Quad
The inclusive minimum to which value should clamp.
max  Quad
The inclusive maximum to which value should clamp.

Return Value

Quad
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