How to use atan2() in combination with other Radian angle systems
问题 I am struggling with this in JavaScript, but this problem applies to many other languages/environments as well. I want to have one object rotating towards the position of another object, and I use: atan2(obj1.dy, obj1.dx) - obj2.getRotation() to check if the second object should rotate clockwise or counterclockwise at a given time. In KineticJS, the JS/HTML5/Canvas programming environment I am using, the angle is specified in radians from 0 to 2 pi starting at the positive Y axis and going