rating refactoring
This commit is contained in:
9
source/HelperFunctions.hx
Normal file
9
source/HelperFunctions.hx
Normal file
@ -0,0 +1,9 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user