View Single Post
  #8  
Old 12-16-2008, 11:14 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
For angle, try
PHP Code:
angle = (pi 2) / * (dir 1); 
getAngle(x, y) works with a coordinate plane. For example, getAngle(-2, 1):



So, to get the right result with getAngle(), you'd have to do something like this:

PHP Code:
angle getAngle(vecx(dir), vecy(dir)); 
which is far too much work when you can use a simpler solution.
__________________
Reply With Quote