Mail Archives: djgpp/2000/06/09/13:31:15
Robin Johnson <robbat2 AT home DOT com> writes:
> not neccesarily, say for example you have
> 4.0, which, rounded off, will still be 4.0
> if you add .5 it will become 5.0 instead of 4.0
Umm, I believe the idea is "add 0.5 and truncate". So 4.0 -> 4.5 ->
4.0 but 4.6 -> 5.1 -> 5.0.
>
> Olaf van der Spek wrote:
> >
> > "Robin Johnson" <robbat2 AT home DOT com> schreef in bericht
> > news:39367A02 DOT 7EA47FC5 AT home DOT com...
> > > To make it round up, add .4 to your number right before you round
> > > and to round down, subtract .4
> >
> > Shouldn't that be + 0.5?
>
> --
> Robin Hugh Johnson
> "Robbat2"
> QTOD: "I used to be an idealist, but I got mugged by reality."
> E-Mail : robbat2 AT orbis-terrarum DOT net
> ICQ# : 30269588 or 41961639
> Home Page : http://www.orbis-terrarum.net
> Time Zone : Pacific Daylight (GMT - 8)
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -