Static variables
Static methods
staticinlineangleMove(a:Float, b:Float, max:Float):Float
Move angle a towards angle b with a max increment. Return the new angle.
staticinlineb2f(v:Int):Float
takes an int , masks it and devide so that it safely maps 0...255 to 0...1.0 @paramv an int between 0 and 255 will be masked
Returns:
a float between( 0 and 1)
staticinlineease(a:Float, b:Float, k:Float, easing:Float):Float
Similar to linear interpolation (k is between [0,1]), but can be controled with easing parameter. When easing is 0 it's linear.
staticinlinef2b(v:Float):Int
takes a float , clamps it and multipy so that it safely maps 0...1 to 0...255.0
Parameters:
f | a float |
---|
Returns:
an int [0...255]
staticinlineinverseLerp(a:Float, b:Float, val:Float):Float
Returns a value between 0 and 1, that determines where val lies between a and b.
staticinlinelerp(a:Float, b:Float, k:Float):Float
Linear interpolation between two values. When k is 0 a is returned, when it's 1, b is returned.
staticinlinelerpTime(a:Float, b:Float, k:Float, dt:Float):Float
Same as lerp but is scaled based on current FPS, using current elapsed time in seconds.
staticinlinevalueMove(v:Float, target:Float, max:Float):Float
Move a value towards the given target using the max increment. Return the new value.