9 lines
238 B
Haxe
9 lines
238 B
Haxe
class HelperFunctions
|
|
{
|
|
public static function truncateFloat( number : Float, precision : Int): Float {
|
|
var num = number;
|
|
num = num * Math.pow(10, precision);
|
|
num = Math.round( num ) / Math.pow(10, precision);
|
|
return num;
|
|
}
|
|
} |