Math
Functions
anumberThe value when t is 0
bnumberThe value when t is 1
tnumberThe mixing factor
Returns a value between a and b
anumberA normalized angle (in degreees) between 0 and 360
bnumberA normalized angle (in degreees) between 0 and 360
tnumberReturns an interpolation between angles a and b, taking the shortest
path
Linearly interpolates between numbers a and b by the mixing factor c.
Assumes that that interpolation occurs in a closed loop and takes the
shortest path from a to b.
This is useful when interpolating cyclic values like "time" in a closed path, or angles.
anumberThe value when t is 0
bnumberThe value when t is 1
tnumberThe mixing factor
basenumberThe size of the cyclic domain. For angles specified in degrees this would be 360.
Returns a value between a and b
Constrains a value to not exceed a maximum and minimum value.
xnumberThe value to constrain
minnumberThe minimum value to return
maxnumberThe maximum value to return
Returns a value between min and max
Constrains a value to the range 0 to 1.
xnumberThe value to constrain
Returns a value between 0 and 1
Smoothly interpolates between 0 and 1 when edge0 < x < edge1.
edge1numberThe value of x where 0 will be returned
edge2numberThe value of x where 1 will be returned
xnumberThe value to use for interpolation
Returns a value between 0 and 1
xnumberReturns the fractional part of the value x
anumberbnumberReturns the shortest signed angle from a to b in degrees.
Constants
The conversion factor from degrees to radians.
See radiansFromDegrees().
The conversion factor from radians to degrees.
See degreesFromRadians().
The ratio of a circle's circumference to its diameter. Pi (π) radians equates to a 180° rotation.
Defined to be PI * 2. In radians, this represents a full 360° rotation.
Equal to TWO_PI. Tau (τ) is the ratio of a circle's circumference to its
radius.
Linearly interpolates between numbers
aandbby the mixing factort.