![]() |
Rounding to the lower number
Math.round(4.7)
How do I round to the lower number? (4 in this case) |
integer division by 1..:) there might be a floor function, but i don't know JavaScript that well.
|
you mean 4/1?
But that would still leave me with a decimal. |
not if you do integer division, but i don't know if you can do that in JS. IN C at least
float a = 4.3; int b = 1; int c = a / b; printf("%d\n", c); // prints 4 |
I believe num.floor() works as well.
|
you probably ment Math.floor()
it worked, thanks |
Shhh...
|
| All times are GMT -5. The time now is 7:57 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC