Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualParadigm Shifter

Posted 18 April 2013 - 02:37 PM

The arguments for atan2 are the y and x coordinates of the triangle, angle = atan2(y, x). y = opposite, x = adjacent in trig-speak, remember that tan(theta) = opposite/adjacent.

 

EDIT: 0 radians is facing due east, pi/2 is north, pi (or -pi) is west and -pi/2 is south.


#3Paradigm Shifter

Posted 18 April 2013 - 02:35 PM

The arguments for atan2 are the y and x coordinates of the triangle, angle = atan2(y, x). y = opposite, x = adjacent in trig-speak, remember that tan(theta) = opposite/adjacent.


#2Paradigm Shifter

Posted 18 April 2013 - 02:35 PM

The arguments for atan2 are the y and x coordinates of the triangle, angle = atan2(y, x). y = opposite, x = adjacent, in trig-speak, remember that tan(theta) = opposite/adjacent.


#1Paradigm Shifter

Posted 18 April 2013 - 02:34 PM

The arguments for atan2 are the y and x coordinates of the triangle. y = opposite, x = adjacent, in trig-speak, remember that tan(theta) = opposite/adjacent.


PARTNERS