Math utility class.
Static methods
staticinlinearrayAvgF(array:Array<FastFloat>):FastFloat
Calculate the average value of all elements of the given kha.FastFloat
array.
staticinlinearrayAvgI(array:Array<Int>):FastFloat
Calculate the average value of all elements of the given integer array.
staticarraySumF(array:Array<FastFloat>):FastFloat
Calculate the sum of all elements of the given kha.FastFloat
array.
staticinlinehitbox(pointX:Int, pointY:Int, posX:FastFloat, posY:FastFloat, sizeX:FastFloat, sizeY:FastFloat):Bool
Check whether the given point is inside the given rectangle
staticinlinemapToRange(value:FastFloat, fromLeft:FastFloat, fromRight:FastFloat, toLeft:FastFloat, toRight:FastFloat):FastFloat
staticroundPrecision(value:FastFloat, precision:Int = 0):FastFloat
Round a value to the given precision.
Parameters:
value | The input value |
---|---|
precision | Number of decimal places |