News for hackers. Stuff that matters.
Re:HTML5 Deck of Cards by 4Data on Thursday September 03, 2015 @02:20PM (#10166655)
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/Refe...

Re:HTML5 Deck of Cards by Stormcaller on Thursday September 03, 2015 @03:21PM (#10166977)
Literally 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.

Re:HTML5 Deck of Cards by catchmrbharath on Thursday September 03, 2015 @02:28PM (#10166702)
Nope. Math.floor(-15.5) would be -16. It rounds a number downwards. -16 < -15.