in reply to rounding to nearest integer

Hmmm... I saw many answers here. But what about the usual way of rounding? $rounded=int($value+0.5);
Later... What I've learned:
1) Just because you always did something in a specific way doesn't mean it's correct.
2) Just becaus a text seems complicated doesn't mean you are free to ignore it
3) Sometimes you learn it the hard way ;-/

Replies are listed 'Best First'.
(jeffa) 2Re: rounding to nearest integer
by jeffa (Bishop) on May 11, 2003 at 22:37 UTC
      /me was too embarassed to point it out :)
        So I didn't learn from you but from Jeffa. Shame on you ;-)