Closed t0mmyka closed 3 weeks ago
Thank you for spotting this t0mmyka! You are indeed right. Fortunately it seems that all of my programs using atan2 were actually passing arguments in the correct order despite the swapped names. I just corrected this in math.h and in the website API reference too, so I will close this issue.
OpCode 61, ATAN2 uses register 1 as the Y component and register 2 as the X component. However in math.h atan2 labels the first argument X and uses it as register 1 and labels the second argument Y and uses it as register 2, and the C API reference page for math.h also labels the first argument X and the second Y. This means that both OpCode and the atan2() function in math.h follow the common practice of Y first X second, but the documentation for math.h labels it incorrectly.