POV-Ray : Newsgroups : povray.newusers : mod() and floating point division woes. :( : Re: mod() and floating point division woes. :( Server Time
23 Apr 2024 09:28:15 EDT (-0400)
  Re: mod() and floating point division woes. :(  
From: jr
Date: 2 Sep 2018 21:25:00
Message: <web.5b8c8c49243d0a7b1500b2fd0@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> I _just_ want to use mod (N, 0.1) in a loop of #for(N, 0, 1, 0.02).

the manual shows an explicit int() in the formula. (section 3.3.1.5.3).

use integers for loop control + scale to taste, for the mod scale beforehand +
convert the result into the fractional value as needed.

(personal opinion + based on ignorance of POV's inner workings  :-))


regards, jr.


Post a reply to this message

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