|
![](/i/fill.gif) |
"Bob H." <omn### [at] msn com> wrote in message
news:3bfe4c10@news.povray.org...
> "Tom Melly" <tom### [at] tomandlu co uk> wrote in message
> news:3bfe2478@news.povray.org...
> > The docs refer to mod(A, B) as:
> > Formula is mod=((A/B)-int(A/B))*B
> >
> > Shouldn't that be:
> > Formula is mod=A-(int(A/B)*B)
>
> Not that I'd know or anything but I thought: mod=A/B-int(A/B)
> For instance, if A=3 and B=2 that would get you the modulus 0.5; so long
as
> int() rounds down anyway.
Well, chalk another lesson up for me. One of those obscure mathematical
things to me, I always think modulus gets you just a (decimal) remainder
after division. Looking it up I see it could be a whole number or at least
1 anyhow. Still, seems that if you do either the Doc formula or yours, Tom,
that it comes out the same. Just I'm not not %100 sure.
In fact what I said is probably, simply put, a "remainder" only whereas
modulus is another matter. So please excuse my ignorance. Thank you :-)
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |