POV-Ray : Newsgroups : povray.newusers : rounding and logic functions : rounding and logic functions Server Time
7 May 2024 12:02:43 EDT (-0400)
  rounding and logic functions  
From: Bald Eagle
Date: 2 Aug 2013 00:55:04
Message: <web.51fb3b6e744b4afe73fc9ebb0@news.povray.org>
I was plotting some data, (Version 3.6) and I had a lot of trouble getting
otherwise programmatically simple goals accomplished.

I see there are ceil() and floor() directives, though these seem suspect.

There's div(A,B)

There's mod(), the definition of which in the manual seems ... odd.
a remainder ought to be (A/B) - int(A/B)
But the manual says that this is them multiplied by B
Maybe I'm just ignorant abut the definition of "modulus", but then the textual
definition in the manual is misleading.

There's int()

Is there no simple ROUND() function?  To round a number to Q decimal places?


Also, how do I perform an OR comparison?

IF (X = A _OR_ B)?


Thanks again to those more knowledgeable than I.


Post a reply to this message

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