POV-Ray : Newsgroups : povray.general : A macro that drops a vector-- what's the syntax again? : Re: A macro that drops a vector-- what's the syntax again? Server Time
7 Sep 2024 18:16:02 EDT (-0400)
  Re: A macro that drops a vector-- what's the syntax again?  
From: Greg M  Johnson
Date: 11 Nov 2005 21:40:16
Message: <43755610@news.povray.org>
Greg M. Johnson wrote:


 Oi vey!  Too much late-night coding, I guess.  :-S

Yes, that's an abs() function.  I wanted a sign() function and so was
writing my own.

Perhaps it was late-night delusions, but I did think that povray 3.5 (the
apt-get version) was freaking with me when it came to nested function/macro
calls. 


> I cannot get the following code to work:
> 
> //-----------------------------
> #macro sign(a)
> #if (a<0)
>         (-a)
> #else
>         (a)
> #end
> #end


Post a reply to this message

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