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

Another way to fix the bug would've been

  INT(RND(1) * 15 + .5)
which is equivalent to rounding to the nearest integer* instead of truncating.

*If positive, which RND's return value must be.



The labyrinth-printing example for the C64 also uses this: https://10print.org/




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

Search: