I'm assuming PHP has a floor function: floor($num * 2) / 2
ought to do it.
↧
Answer by tzaman for Round DOWN to nearest half integer in PHP
↧
I'm assuming PHP has a floor function: floor($num * 2) / 2
ought to do it.