Image

Imagebrindy wrote in Imagephp

Is there a better way to round a float to the nearest .5?


function roundToPoint5($num) {
$rem = fmod($num, 1);
return ($num - $rem) + (round($rem) / 2);
}