POV-Ray : Newsgroups : povray.newusers : rounding : rounding Server Time
28 Jul 2024 16:28:34 EDT (-0400)
  rounding  
From: stevenvh
Date: 25 Jun 2008 05:15:00
Message: <web.48620baa50ae02ffc0721a1d0@news.povray.org>
I'm surprised (and a bit pissed off) not to find a means to round a number to
the nearest integer.
I want to use the rand() function to randomly generate a rotation angle which is
a multiple of 90 degrees, which I would write in any programming language I know
as

  RotAngle = 90 * round(4 * rand(RandSeed))

How should I do this in POV-Ray?
TIA
Steven


Post a reply to this message

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