I have imported math in my cap
so math.atan2 works if it's in my cap's python scripts
at runtime if I use the Run Python Script action, I can use a script directly from math such as
Run Python Script: "x=math.atan2(1,2)";
but a function defined in the cap which can be called successfully within the cap itself:
def atantwo(first,second):
return math.atan2(first,second);
#x=atantwo(1,1); would work fine here[/code:ggiv2n5i]
but if I use the Run Python Script action at runtime and try:
Run Python Script: "x=atantwo(1,2);"
I get an error:
NameError: global name 'atan2' is not defined
is this a bug, or a limitation, or is there a special way to make it work?