Const
Clamps the x to be between a and b.
Value to be clamped.
Minimum value
Maximum value.
Smoothly interpolate a number from x toward y in a spring-like manner using the dt to maintain frame rate independent movement. http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/
Current point.
Target point.
A higher lambda value will make the movement more sudden, and a lower value will make the movement more gradual.
Delta time in seconds.
Converts degrees to radians.
Radians
Compute euclidian modulo of m % n ( ( n % m ) + m ) % m https://en.wikipedia.org/wiki/Modulo_operation
The Euclidean modulo
target
modulus
Compute the largest power of 2 that is less than or equal to n.
The power of 2.
Generate a UUID (universally unique identifier).
The UUID string.
Calculate the percentage in the closed interval [0, 1] of the given value between the start and end point.
The resulting percentage value.
Start point.
End point.
A value between start and end.
Determine if a value is a power of 2.
if n is a power of 2.
The value to test.
Returns a value linearly interpolated from two known points based on the given interval - t = 0 will return x and t = 1 will return y. https://en.wikipedia.org/wiki/Linear_interpolation
Start point.
End point.
interpolation factor in the closed interval [0, 1]
Linear mapping of x from range [a1, a2] to range [b1, b2].
Value to be mapped.
Minimum value for range A.
Maximum value for range A.
Minimum value for range B.
Maximum value for range B.
Returns a value that alternates between 0 and length. https://www.desmos.com/calculator/vcsjnyz7x4
The value to pingpong.
Optional
length: numberThe positive value the export function will pingpong to. Default is 1.
Convert radians to degrees.
The degrees.
The radians to convert
Random float in the interval [low, high].
The random float.
Random float in the interval [- range / 2, range / 2].
The random float.
Random integer in the interval [low, high].
The random integer.
Deterministic pseudo-random float in the interval [ 0, 1 ].
The random number
Optional
s: numberThe seed
Sets quaternion q from the intrinsic Proper Euler Angles defined by angles a, b, and c, and order order. Rotations are applied to the axes in the order specified by order: rotation by angle a is applied first, then by angle b, then by angle c. Angles are in radians.
the quaternion to be set
the rotation applied to the first axis, in radians
the rotation applied to the second axis, in radians
the rotation applied to the third axis, in radians
a string specifying the axes order: 'XYX', 'XZX', 'YXY', 'YZY', 'ZXZ', or 'ZYZ'
Compute a value between 0-1. A variation on smoothstep that has zero 1st and 2nd order derivatives at x=0 and x=1.
The step value.
The value to evaluate based on its position between min and max.
Any x value below min will be 0.
Any x value above max will be 1.
Calculate a value between 0-1 that represents the percentage that x has moved between min and max, but smoothed or slowed down the closer X is to the min and max. http://en.wikipedia.org/wiki/Smoothstep
The value.
The value to evaluate based on its position between min and max.
Any x value below min will be 0.
Any x value above max will be 1.
Compute the smallest power of 2 that is greater than or equal to n.
Returns
The power of 2.