POV-Ray : Newsgroups : povray.newusers : Newbie question about functions : Newbie question about functions Server Time
2 Jul 2024 21:29:03 EDT (-0400)
  Newbie question about functions  
From: TheBigH
Date: 20 Dec 2010 01:55:01
Message: <web.4d0efc974d34203e5656816c0@news.povray.org>
Why does this not work? It complains that I need to initialize X and Y before I
call them in the macro Fracp, but since I am passing them as parameters to the
function Gridd this would obviously be inappropriate. I have also tried changing
the macro into another function, but that doesn't work either.


#declare thick=0.05;
#macro Fracp(A)
 A-floor(A)
#end
#declare Gridd = function( X, Y ) {
 #if ( Fracp(X)<thick | Fracp(X)>(1-thick) | Fracp(Y)<thick | Fracp(Y)>(1-thick)
)
   1
 #else
   0
#end
}


Cheers,
H.


Post a reply to this message

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