Returns the greatest number value that is not greater than the argument and is equal to a mathematical integer. If the argument is already an integer, the argument itself is returned.
Special boundary conditions that affect the results are:
Note that if the value is negative, the magnitude increases while it decreases for positive numbers. The floor of 25.4 is 25 whereas the floor of -25.4 is -26.
The result is the input value value rounded down to the next integer.
Other reference sources on this function differ as to its functionality. Some indicate that it rounds up to an integer, others that it rounds down. However, all implementations appear to conform to the ECMA specified behavior.
Prev | Home | Next |
Math.exp() | Up | Math.LN10 |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |