Compares two numbers for approximate equality
Number A
Number B
Equality threshold (defaults to Number.EPSILON)
Whether a is approximately equal to b
Returns the average of an array of numbers
Numbers to average
Average of given numbers
Clamps a number between a minimum and maximum
Number to be clamped
Minimum
Maximum
Clamped value of n
Converts degrees to radians
Angle in degrees
Angle in radians
Calculates the distance between two points
First X coordinate
First Y coordinate
Second X coordinate
Second Y coordinate
Distance between x1, y1 and x2, y2
Converts an index to grid X coordinate
Index
Grid width
X coordinate for index
Converts an index to grid Y coordinate
Index
Grid width
Y coordinate for index
Linear interpolation between two numbers
Number A
Number B
Normalized time (between 0 - 1)
Rounds return value
Interpolated value between a and b
Linear interpolation between two angles via shortest angle
Start angle
End angle
Normalized time (between 0 - 1)
Interpolated angle between a and b
Returns the mid value between two numbers
Number A
Number B
Mid value between a and b
Normalizes a value between a minimum and maximum
Value to normalize
Minimum
Maximum
Normalized value of n, between min and max
Converts radians to degrees
Radians
Degrees
Rounds a value to a specified number of decimal places
Value to round
Number of decimal places to round
Rounded value of value
Returns the sign of a number
Number
Sign of n, -1, 0, or 1
Wrap radians around a complete circle (PI * 2)
Radians to wrap
Wrapped radians
Converts grid coordinates to an index
X coordinate
Y coordinate
Grid width
Index value of x, y
Generated using TypeDoc
TAU is a handy shortcut for 2PI
1.2.1