Hi,
I looked at the Javascript output in the console for a browser.
I did use the ATan2D((y2 - y1), (x2 - x1)) in my B4J project where it works fine but now when I'm trying to convert to BANano then the parentheses gets messed up and leaving only the y2-y1 within the atan2 converted Javascript. But I had some similar issues on other places in function calls with not only pure variables but then it has been missing parenthesis or extra parenthesis which results in a non working page.
This time it is the correct amount of parenthesis but on wrong places and gives a function that is not working as it should.
And
@alwaysbusy it is not due to Radians/Degrees as you can see in my first post. If I use ATan2 I get the same result as ATan2D.
It has something to do with the parentheses within the function call it self.
Now I did a test also without the parenthesis and then it also works!
B4j:
Angle = ATan2D(y2 - y1, x2 - x1)
Generated Javascript:
__1fb=(Math.atan2(_y2-_y1,_x2-_x1)*(180/Math.PI))
I guess that when doing a function call it is best to only use interim values or at least without parenthesis in BANano to avoid problems.
Keep on the good work!
Best regards
Christian