|
|
Here is simple script:
<SDL>
#include "functions.inc"
#declare f_y=function(ph,rad){rad*cos(ph)}
#macro Calc(X,Y,Z)
#debug concat(
" Y=",str(Y,6,3),
" function=",str(f_y(f_ph(X,Y,Z),f_r(X,Y,Z)),6,3),
" parser=",str(f_r(X,Y,Z)*cos(f_ph(X,Y,Z)),6,3),
"\n"
)
#end
Calc(0, 2,0)
Calc(2, 2,3)
Calc(2, 1,3)
Calc(2, 0,3)
Calc(2,-1,3)
Calc(2,-2,3)
Calc(0,-2,0)
</SDL>
I expect it to display three identical columns of values as follow:
Y= 2.000 function= 2.000 parser= 2.000
Y= 2.000 function= 2.000 parser= 2.000
Y= 1.000 function= 1.000 parser= 1.000
Y= 0.000 function= 0.000 parser= 0.000
Y=-1.000 function=-1.000 parser=-1.000
Y=-2.000 function=-2.000 parser=-2.000
Y=-2.000 function=-2.000 parser=-2.000
unfortunatelly it outputs various values when ph function is accesed via
another function:
Y= 2.000 function= 2.000 parser= 2.000
Y= 2.000 function=-1.716 parser= 2.000
Y= 1.000 function=-1.557 parser= 1.000
Y= 0.000 function=-1.500 parser= 0.000
Y=-1.000 function=-1.557 parser=-1.000
Y=-2.000 function=-1.716 parser=-2.000
Y=-2.000 function= 2.000 parser=-2.000
Any idea why ? Any confirmation that it can be a bug ?
ABX
Post a reply to this message
|
|