ShopToolsUtilClamp(Int32, Int32, Int32) Method

Clamp the supplied value within the allowed minimum and maximum values.

Definition

Namespace: ShopTools
Assembly: ShopTools (in ShopTools.exe) Version: 25.2429.4649
C#
public static int Clamp(
	int value,
	int minimum = 0,
	int maximum = 1
)

Parameters

value  Int32
The value to clamp.
minimum  Int32  (Optional)
The minimum allowable value.
maximum  Int32  (Optional)
The maximum allowable value.

Return Value

Int32
The caller's clamped value.

See Also