Extension methods for ints.

Static methods

staticinline clamp (value:Int, min:Int, max:Int):Int

Clamps a value between min and max inclusive.

Parameters:

value

The value to clamp.

min

The minimum allowed value.

max

The maximum allowed value.

Returns:

The value clamped to the range [min, max].

staticinline min (a:Int, b:Int):Int

Returns the smaller of two integers.

Parameters:

a

The first integer.

b

The second integer.

Returns:

The smaller of the two integers.