POV-Ray : Newsgroups : povray.newusers : rounding : Re: rounding Server Time
28 Jul 2024 22:29:43 EDT (-0400)
  Re: rounding  
From: Warp
Date: 29 Jun 2008 18:54:59
Message: <486812c3@news.povray.org>
andrel <a_l### [at] hotmailcom> wrote:
> >   Why? floor(value+.5) does the same thing.
> > 
> no it doesn't, that was the whole point. In some cases people want a 
> function that round halves away from zero. round(-3.5)=-4

  Why would anyone want to round halves away from zero? And if someone
*really* wants that, he can make his own function which does that. The
rest can use either floor(value+.5) or ceil(value-.5), whichever they
prefer.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.