90
rated 0 times
[
94]
[
4]
/ answers: 1 / hits: 24962
/ 15 Years ago, tue, november 10, 2009, 12:00:00
Need help with a math issue:
i need to get the true angle from 0 degrees using x and y cordinates
im using this at the moment:
Math.atan((x2-x1)/(y1-y2))/(Math.PI/180)
but /(Math.PI/180)
limits results from -90 to 90
i need 0-360
note: I'm using the angle to indicate direction:
- 0=up
- 90=right
- 135=45 degree right+down
- 180=down
- 270=left
- etc
More From » javascript