Click or drag to resize

MathUtilClamp Method (Double, Double, Double)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
The closest value to a specified double that falls within a specified range.

Namespace:  Telogis.GeoBase
Assembly: (in Version:
public static double Clamp(
	double x,
	double minValue,
	double maxValue


Type: SystemDouble
The double to clamp.
Type: SystemDouble
The minimum value that can be returned.
Type: SystemDouble
The maximum value that can be returned.

Return Value

Type: Double
If x lies between minValue and maxValue, the result is x. Otherwise, the value is minValue if x is less than minValue, or maxValue if x is greater than maxValue.
See Also