|
![](/i/fill.gif) |
In article <3e6bcf10@news.povray.org> , "Anders K." <and### [at] kaseorg com>
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 are not broken. This is the correct and thus expected
behavior.
> div(7, 3) = 2
> div(-7, 3) = -3
> div(7, -3) = -2
> div(-7, -3) = 3
How can the result possibly be +-3 for any of these? No matter how you
round, this makes only sense if you apply *different* rounding rules
depending on the signs. And doing so is nonsensical.
> mod(7, 3) = 1
> mod(-7, 3) = 2
> mod(7, -3) = 1
> mod(-7, -3) = 2
Again, only if you apply random rules you could arrive at this result. I
could understand you argue for 1,2,2,1 as results for this, but not 1,2,1,2
because that is definitely wrong.
Thorsten
____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povray org
I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |