POV-Ray : Newsgroups : povray.off-topic : povray function thingy(a,b,c,d) : Re: povray function thingy(a,b,c,d) Server Time
10 Oct 2024 23:20:57 EDT (-0400)
  Re: povray function thingy(a,b,c,d)  
From: Warp
Date: 25 Jan 2008 03:05:26
Message: <47999846@news.povray.org>
Greg M. Johnson <pte### [at] thecommononethatstartswithycom> wrote:
> I went and tried a #macro anyway, and it doesn't work.

  It does if you write it right.

#macro hiloer(jay)
    #if (jay<0.5)
        #local result = (0+0.5*(1-sqrt(1-jay*jay*4));
    #else
        #local result = (0+jay);
    #end
    result
#end

  Of course an alternative way of doing the same thing is:

#macro hiloer(jay)
    ((jay<0.5) ?(0+0.5*(1-sqrt(1-jay*jay*4)) : (0+jay)
#end

-- 
                                                          - Warp


Post a reply to this message

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