POV-Ray : Newsgroups : povray.general : Random numbers and rounding : Re: Random numbers and rounding Server Time
3 Aug 2024 00:24:35 EDT (-0400)
  Re: Random numbers and rounding  
From: Warp
Date: 22 Jun 2004 15:32:03
Message: <40d88933@news.povray.org>
ABX <abx### [at] abxartpl> wrote:
> IMO

> #declare round=function(x){floor(x+0.5)};

> would be better.

  Don't know about better, but at least it's much faster. :)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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