Click or drag to resize

MathExtensionsClip Method (Int64, Int64, Int64)

Clips the specified value so it does not exceed min or max.

Namespace:  TomsToolbox.Essentials
Assembly:  TomsToolbox.Essentials (in TomsToolbox.Essentials.dll)
Syntax
public static long Clip(
	this long value,
	long minValue,
	long maxValue
)

Parameters

value
Type: SystemInt64
The value.
minValue
Type: SystemInt64
The minimum value.
maxValue
Type: SystemInt64
The maximum value.

Return Value

Type: Int64
The clipped value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Int64. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also