POV-Ray : Newsgroups : povray.general : mod() returns negative result : Re: mod() returns negative result Server Time
7 Sep 2024 18:12:28 EDT (-0400)
  Re: mod() returns negative result  
From: Dave Matthews
Date: 17 Nov 2005 14:30:01
Message: <web.437cd936244465928c7259570@news.povray.org>
"Ard" <ard### [at] waikatoacnz> wrote:
> Anybody agree?  Anybody care?

As someone who uses congruences modulo a positive integer quite a bit, I
also am used to thinking of mod(a,b) as returning the "principal value" of
the congruence class (i.e. the number 0 <= r < b), but the fixes are pretty
easy, albiet frustrating when you forget the POVRay definition.  And since
I don't use C, C++ or Perl, I can't comment on what's "better," or "more
common" from a programming point of view, though Thorsten's usually pretty
definitive on those questions.

Dave Matthews


Post a reply to this message

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