class Helper
package armory.math
Static methods
staticclamp(f:Float, min:Float, max:Float):Float
Clamps a float within some limits.
Returns:
same float, min or max if exceeded limits.
staticclampInt(f:Int, min:Int, max:Int):Int
Clamps an integer within some limits.
Returns:
same integer, min or max if exceeded limits.
staticinlinedegToRad(degrees:Float):Float
Converts an angle in degrees to radians.
Returns:
angle in radians
staticgetAngle(va:Vec4, vb:Vec4):Float
Returns angle in radians between 2 vectors perpendicular to the z axis.
staticinlinemap(value:Float, leftMin:Float, leftMax:Float, rightMin:Float, rightMax:Float):Float
Convenience function to map a variable from one coordinate space to another. Equivalent to unlerp() followed by lerp().
Parameters:
value | |
---|---|
leftMin | The lower bound of the input coordinate space |
leftMax | The higher bound of the input coordinate space |
rightMin | The lower bound of the output coordinate space |
rightMax | The higher bound of the output coordinate space |
Returns:
Float
staticinlinemapClamped(value:Float, leftMin:Float, leftMax:Float, rightMin:Float, rightMax:Float):Float
staticmoveTowards(current:Vec4, target:Vec4, delta:FastFloat):Vec4
Returns a copy of the current vector summed by delta towards the target vector without passing it.
staticinlineradToDeg(radians:Float):Float
Converts an angle in radians to degrees.
Returns:
angle in degrees