Re: [PHP] PHP Rounding Question

2011-05-20 Thread David Harkness
On Fri, May 20, 2011 at 10:40 AM, Rick Dwyer wrote: > How do I coerce the result to always round up to the nearest increment 1/4? > $x = ceil($x * 4) / 4; David

[PHP] PHP Rounding Question

2011-05-20 Thread Rick Dwyer
I have a division formula that will return an value from 0.00 to 5... so I can get values like 2.38 or 4.79. However, never lower than 0 or higher than 5. How do I coerce the result to always round up to the nearest increment 1/4? So for example: 2.06 gets rounded to 2.25 0.01 gets rounde