Background on me, i do a bit of C and C++ programming, and am trying to use the VB script plugin.
The 'IF' statement seems to playing havoc on me, because i can't seem to find the right syntax for a comparison.
I have this code:
RBdY = (RY-BY)
RBdX = (RX-BX)
heading1 = 0
heading1 = (tan(RBdY/RBdX))*(180/3.14156932)
SetVariable "Heading", heading1
RY, BY, RX, BX are all pixel co-ordinates i have determined before the VB script, and are read in via 'RX = GetVariable("RedX")' etc...
Im trying to detect if RBdX is equal to 0, so i can avoid a division by zero. however the if statement always fails and i'll get a division by 0 error when RBdX is 0.
I've tried '==', also tried '!=' or '<>' and reversed the logic, nothing works.
I can't seem to locate any debugging tools in the built in VBscript plugin, am i just being blind?
Also, is there no function for Pi?
I appreciate any help given on this problem.