Mathf
Types
Functions
Returns 0.0 if the given value is within the specified range around zero. The remaining range between the deadband and the maximum magnitude is scaled from 0.0 to the maximum magnitude. Maximal magnitude is 1 for this infix overload.
Returns 0.0 if the given value is within the specified range around zero. The remaining range between the deadband and the maximum magnitude is scaled from 0.0 to the maximum magnitude.
Returns the closest power of two that is equal to or larger than the specified value.
Determines the index with the highest value in this array.
Determines the index with the lowest value in this array.
Return where within interpolation range 0, 1 q is between the start and end pair.
Return where within interpolation range 0, 1 q is between startValue and endValue.
Checks if the given value matches an expected value within a certain tolerance.
Checks if the given value matches an expected value within a certain tolerance. Supports continuous input for cases like absolute encoders.
Returns whether the given value is a power of two.
Perform linear interpolation like lerp, but interpolates correctly when they wrap around 1 revolution (360 degrees).
Perform linear interpolation between two values.
Perform linear interpolation between two values.
Find the intersection between a line and a circle.
Find the intersection of two lines.
Find the intersection between a line segment and a circle.
Find the intersection of two line segments.
Same as moveTowards, but makes sure the values interpolate correctly when they wrap around 1 revolution (360 degrees).
Moves a current value towards target
.
Returns the next power of two that is equal to or larger than the specified value.
Orders OpenCV camera points to be in the order top-left, top-right, bottom-right and bottom-left.
Gradually changes an angle towards a desired goal over time.
Gradually changes a value towards a desired goal over time.
Interpolates between min and max with smoothing at the limits.
Normalizes the given angle to be within the range of [0, 2pi) radians or [0, 360) degrees.
Returns modulus of input.
Wraps radians to the range -pi to pi.
Normalizes the given radians to be within the range [0, 2pi).