|
![](/i/fill.gif) |
>
> hello,
>
> i have this simple macro :
>
> #macro lineEquation (x1,z1,x2,z2) #local det = x1-x2; #if(det=0)
> #error "\n\n---\nWarning, the system has no unique solution.\nProgram
> stop here\n\n" #else #local det_a = z1-z2; #local det_b =
> (x1*z2)-(z1*x2); <det_a/det, det_b/det, 0> #end #end
>
I seem to recall something similar happening to me... I think it was
due to the return value being not declared and inside an "if". Try this:
#macro lineEquation (x1,z1,x2,z2)
#local det = x1-x2;
#if(det=0)
#error "\n\n---\nWarning, the system has no unique
solution.\nProgram stop here\n\n"
#else
#local det_a = z1-z2;
#local det_b = (x1*z2)-(z1*x2);
#local result=<det_a/det, det_b/det, 0>;
#end
result
#end
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |