Click or drag to resize

MathHelperClamp Method

Restricts a value to be within a specified range.

Namespace: CFX.Utilities
Assembly: CFX (in CFX.dll) Version: 1.7.3
Syntax
public static double Clamp(
	double value,
	double min,
	double max
)

Parameters

value  Double
The value to clamp.
min  Double
The minimum value. If value is less than min, min will be returned.
max  Double
The maximum value. If value is greater than max, max will be returned.

Return Value

Double
The clamped value.
See Also