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

Can't you just internally multiple everything by 2, average the whole thing, round, then divide by 2 to get half point ratings?

  stars = round(star_sum * 2 / num_raters)/2


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

Search: