Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

value | 0 will always return a 32 bit integer.

Math.floor(value) can return some weirder values such as: NaN (for anything that isn't a number), and Infinity, -Infinity, -0. And Math.floor(-1e-300); is -1 so care needs to be taken with floating values near zero.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: