class Math
package hxd
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]
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.