We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could we get a method for angle between two vectors?`
Something like:
var v1 = new Victor(10, 10); var v2 = new Victor(20, 20); var angle = v1.angle(v2);
This would be inherently useful for game programming.
The text was updated successfully, but these errors were encountered:
Here is a Gist that I've starred and use currently:
https://gist.github.com/conorbuck/2606166
var p1 = { x: 20, y: 20 }; var p2 = { x: 40, y: 40 }; // angle in radians var angleRadians = Math.atan2(p2.y - p1.y, p2.x - p1.x); // angle in degrees var angleDeg = Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI;
Sorry, something went wrong.
No branches or pull requests
Could we get a method for angle between two vectors?`
Something like:
This would be inherently useful for game programming.
The text was updated successfully, but these errors were encountered: