Math.floor()
syntax: |
Math.floor(x) |
where: |
x - a number.
|
return: |
number - the greatest number value that is not greater than the argument and is equal to a mathematical integer.
|
description: |
If the argument is already an integer, the return value is the argument itself.
|
example: |
//The floor of x is returned //in the following function: function compute_floor(x) { return Math.floor(x) } //If 6.78 is passed to compute_floor, //7 will be returned. If 89.1 //is passed, 90 will be returned. |