MathUtils
A collection of math utility functions.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Anyclass Objecttrait Matchableclass Any
- Self type
-
MathUtils.type
Members list
Value members
Concrete methods
Returns the smallest power of two that is greater than or equal to the given number.
Returns the smallest power of two that is greater than or equal to the given number.
Attributes
Clamps the given value between min and max.
Clamps the given value between min and max.
Attributes
Smoothly interpolate a number from x to y in a spring-like manner.
Smoothly interpolate a number from x to y in a spring-like manner.
Attributes
Converts degrees to radians.
Converts degrees to radians.
Attributes
Denormalizes the given value according to the given typed array.
Denormalizes the given value according to the given typed array.
Attributes
Computes the Euclidean modulo of the given parameters: ((n % m) + m) % m
Computes the Euclidean modulo of the given parameters: ((n % m) + m) % m
Attributes
Returns the largest power of two that is less than or equal to the given number.
Returns the largest power of two that is less than or equal to the given number.
Attributes
Generate a UUID (universally unique identifier).
Generate a UUID (universally unique identifier).
Attributes
Returns the percentage in the closed interval [0, 1] of the given value between the start and end point.
Returns the percentage in the closed interval [0, 1] of the given value between the start and end point.
Attributes
Returns true if the given number is a power of two.
Returns true if the given number is a power of two.
Attributes
Returns a value linearly interpolated from two known points. t = 0 returns x and t = 1 returns y.
Returns a value linearly interpolated from two known points. t = 0 returns x and t = 1 returns y.
Attributes
Performs a linear mapping from range <a1, a2> to range <b1, b2> for the given value.
Performs a linear mapping from range <a1, a2> to range <b1, b2> for the given value.
Attributes
Normalizes the given value according to the given typed array.
Normalizes the given value according to the given typed array.
Attributes
Returns a value that alternates between 0 and the given length parameter.
Returns a value that alternates between 0 and the given length parameter.
Attributes
Converts radians to degrees.
Converts radians to degrees.
Attributes
Returns a random float from <low, high> interval.
Returns a random float from <low, high> interval.
Attributes
Returns a random float from <-range/2, range/2> interval.
Returns a random float from <-range/2, range/2> interval.
Attributes
Returns a random integer from <low, high> interval.
Returns a random integer from <low, high> interval.
Attributes
Returns a deterministic pseudo-random float in the interval [0, 1].
Returns a deterministic pseudo-random float in the interval [0, 1].
Attributes
Sets the given quaternion from the Intrinsic Proper Euler Angles.
Sets the given quaternion from the Intrinsic Proper Euler Angles.
Attributes
A variation on smoothstep that has zero 1st and 2nd order derivatives at x=0 and x=1.
A variation on smoothstep that has zero 1st and 2nd order derivatives at x=0 and x=1.
Attributes
Returns a value in the range [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.
Returns a value in the range [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.
Attributes
Inherited methods
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object