|
![](/i/fill.gif) |
Christopher James Huff wrote:
> Anders K. wrote:
>> This has annoyed me a lot. If they fixed the
>> broken gradient pattern, why can't they fix
>> the equally broken div() and mod() functions?
>
> Because they didn't know about it?
The way the mod() function works for negative numbers has annoyed me a
lot too, but having originally learned about the mod() function through
POV-Ray, I thought it was just the way it was supposed to work, pleasant
or not.
Actually, if you look in colors.inc in the CH2RGB macro, you will see
that I explicitly worked around the problem by having this line
#local H = mod(H, 360);
be followed by this one:
#local H = (H < 0 ? H+360 : H);
Internally, isn't it just some int() call that should be replaced with
floor()? From the docs:
mod(A,B) Value of A modulo B. Returns the remainder
after the integer division of A/B.
Formula is mod=((A/B)-int(A/B))*B.
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |