Hacker News new | past | comments | ask | show | jobs | submit login

Please don't do that. Here's a one liner:

    round( 2.0 * star_sum / num_raters) / 2.0



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

Search: