POV-Ray : Newsgroups : povray.beta-test : Doc Error for mod? : Re: Doc Error for mod? Server Time
30 Jul 2024 10:23:46 EDT (-0400)
  Re: Doc Error for mod?  
From: Bob H 
Date: 23 Nov 2001 08:16:00
Message: <3bfe4c10@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> 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.

Bob H.


Post a reply to this message

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