StaticclampReturns the clamped value, no lower than low and not higher than high.
Value to clamp.
Low limit.
High limit.
StaticlerpLinear interpolation between two values.
Interpolation value. 0 aligns to low, 1 aligns to high.
Low limit.
High limit.
StaticmaxReturn the largest value.
This is way faster than Math.max for two values.
The 1st value.
The 2nd value.
The largest value.
StaticminReturn the smallest value.
This is way faster than Math.min for two values.
The 1st value.
The 2nd value.
The smallest value.
StaticrandomReturns a random float within range [0, limit)
The upper exclusive limit of the range.
A random float.
StaticrandomReturns a random "true" or "false" value.
The probability of returning true. Default is 50%.
A random int.
StaticrandomReturns a random float within range [low, high)
The lower inclusive limit.
The upper exclusive limit.
A random float.
StaticrandomReturns a random int within range [0, limit)
The upper exclusive limit of the range.
A random int.
StaticrandomReturns a random int within range [low, high)
The lower inclusive limit.
The upper exclusive limit.
A random int.
StaticrandomReturns a random index picked according to its weight.
An array of weights.
StaticrollingReturns the calculated average of adding one more value to a previous average.
Item count including the new one.
Average so far.
New item to add to average.
StaticsizeReturns a rectangle that covers the enclosing rectangle whose smaller side is minSide with the given rectangle of the given width and height, maintaining aspect ratio.
Width of a rectangle.
Height of a rectangle.
Smaller side of the enclosing rectangle.
StaticsizeReturns a rectangle that fits the given rectangle of the given width and height into an enclosing rectangle whose large side is maxSide, maintaining aspect ratio.
Width of a rectangle.
Height of a rectangle.
Larger side of the enclosing rectangle.
Math utilities.