Static extension of Float.
Static methods
staticinline bezier (rate:Float, values:Array<Float>):Float
Bernstein polynomial, which is the mathematical basis for Bézier curve
staticinline bezier2 (rate:Float, from:Float, control:Float, to:Float):Float
Quadratic Bernstein polynomial
staticinline bezier3 (rate:Float, from:Float, control1:Float, control2:Float, to:Float):Float
Cubic Bernstein polynomial
staticinline binarySearch (sortedValues:Array<Float>, value:Float, boundaryMode:BoundaryMode = BoundaryMode.Low):Int
Parameters:
sortedValues | must be sorted |
---|---|
value | |
boundaryMode |
Returns:
0 to sortedValues.length integer
staticinline connectEasing (time:Float, easing1:Float ‑> Float, easing2:Float ‑> Float, switchTime:Float = 0.5, switchValue:Float = 0.5):Float
staticinline crossfadeEasing (rate:Float, easing1:Float ‑> Float, easing2:Float ‑> Float, easing2StrengthEasing:Float ‑> Float, easing2StrengthStart:Float = 0, easing2StrengthEnd:Float = 1):Float
Gradually changes to another easing at the beginning and at the end
staticinline inverseLerp (value:Float, from:Float, to:Float):Float
Normalizes a value
within the range between from
and to
into a value between 0 and 1
staticinline lerp (rate:Float, from:Float, to:Float):Float
Linear interpolation between from
and to
by rate
staticinline mixEasing (rate:Float, easing1:Float ‑> Float, easing2:Float ‑> Float, easing2Strength:Float = 0.5):Float
Intermediate easing between the two easings
staticinline oneTwoEasing (time:Float, easingOne:Float ‑> Float, easingTwo:Float ‑> Float, switchTime:Float = 0.5):Float
staticinline uniformQuadraticBSpline (rate:Float, values:Array<Float>):Float
Uniform Quadratic B-spline
staticinline yoyo (rate:Float, easing:Float ‑> Float):Float
Round trip motion that goes from 0.0 to 1.0 and returns to 0.0 in the reverse playback movement.
staticinline zigzag (rate:Float, easing:Float ‑> Float):Float
Round trip motion that goes from 0.0 to 1.0 and returns to 0.0 with the movement in which the moving direction is reversed.