5 ms·
Hmm, pretty sure floor rounds a number downward to its nearest integer. So Math.floor(-15.5) would be 15. https://developer.mozilla.org/pt-PT/docs/Web/JavaScri
by 4Data 11y ago
Hmm, pretty sure floor rounds a number downward to its nearest integer. So Math.floor(-15.5) would be 15.
https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Math/floor https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Refe...
- catchmrbharath 11y agoNope. Math.floor(-15.5) would be -16. It rounds a number downwards. -16 < -15.
- Stormcaller 11y agoLiterally the first example on that page: > Math.floor( 45.95); // 45 > Math.floor(-45.95); // -46 Its not like its hidden or anything... Its in the center of the page on my 1920x1080 screen.