POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature request: "resolution" keyword for gradients and maps : Re: Feature request: "resolution" keyword for gradients and maps Server Time
8 May 2024 15:56:17 EDT (-0400)
  Re: Feature request: "resolution" keyword for gradients and maps  
From: Warp
Date: 24 Jun 2008 08:53:39
Message: <4860ee53@news.povray.org>
SharkD <nomail@nomail> wrote:
> http://wiki.povray.org/content/HowTo:Turn_a_function_into_a_stepped_function

  One small error: int() doesn't round the value to the nearest integer.
It simply drops the decimal part of the value.

  If you want to round, you have to say int(theValueToBeRounded + .5).
(Although one should note that this works correctly only for positive
values. OTOH, pattern values are always positive.)

-- 
                                                          - Warp


Post a reply to this message

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