This function will round an input decimal down.
floor(val)
double
Returns: int
int
This function will round an input decimal down, it is similar to round(); but instead will always round down compared to the nearest whole number.
round();
double numberToRoundDown = 5.9999; var RoundedNumberDown = floor(numberToRoundDown); //return 5
This code will round down double numberToRoundDown with value 5.9999 to var RoundedNumberDown with value 5.
var
Back to number_functions
There was an error while loading. Please reload this page.