|
 |
Which is the same macro construct as the following:
// ------------------ Scalar failure ---------------------------
#macro BugScalar(A,B,X)
#if (X < A)
0
#else
((X - A) / (B - A))
#end
#end
// ------------------ Vector failure ---------------------------
#macro BugVector(X)
#if (X < 0.5)
<1,0,0>
#else
<0,1,0>
#end
#end
However this works:
#macro Test (N)
0
#end
#local Val = Test (1);
and (provisionally)
#macro Test (N)
#if (N < 1)
#local Result = 0;
#else
#local Result = 1;
#end
Result
#end
#local Val = Test (1);
Also, as Mr. Callwood advised in an older thread,
wrapping the internals of the macro in parentheses allows successful evaluation:
#macro BugScalar(A,B,X)
(
#if (X < A)
0
#else
((X - A) / (B - A))
#end
)
#end
Post a reply to this message
|
 |