POV-Ray : Newsgroups : povray.general : Need math help : Re: Need math help Server Time
10 Aug 2024 09:16:20 EDT (-0400)
  Re: Need math help  
From: David Fontaine
Date: 11 Mar 2000 16:45:25
Message: <38CABD9D.5BB9663F@faricy.net>
John VanSickle wrote:

> I avoided using the trig functions.  I also made local copies of the
> arguments, so that if the user passes an expression as one of the arguments,
> that expression will be evaluated.  For instance, this macro
>
>   #macro MyMacro(A,B) (A-B) #end
>
> can be invoked this way:
>
>   #local J=MyMacro(77*2,45*2-23*3);
>
> which POV-Ray will evalaute as:
>
>   #local J=77*2-45*2-23*3;
>
> which is almost certainly *not* what the user wanted.

Bzz, wrong!
Run this code:

#macro Test(a,b) a-b #end
#render concat(str(Test(2*5,2*4-2*3),1,0),"\n")
sphere{0,1} //So POV doesn't whine

--
___     _______________________________________________
 | \     |_          <dav### [at] faricynet> <ICQ 55354965>
 |_/avid |ontaine        http://www.faricy.net/~davidf/

"The only difference between me and a madman is that I'm not mad." -Dali


Post a reply to this message

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