Math.floor(value) Last updated: 14. Jan 2023
Rounds a number always downwards direction.
Parameters
Name | Type | Description |
---|---|---|
value | number | Value to floor. |
Returns
A number that is rounded against floor.
Example
Code example (#JS)
#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.This becomes 0:
#Math.floor(0.9)#
Output
The #JS code above produces the output shown below:This becomes 0:
0