View Single Post
  #6  
Old 05-08-2008, 04:24 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
PHP Code:

function atan2(y,x) {
  if (
0) {
    return 
atan(y/x);
  } elseif (
0) {
    return 
atan(y/x) - radian(180);
  } elseif (
== 0) {
    if (
0) {
      return 
radian(90);
    } elseif (
0) {
      return 
radian(-90);
    } elseif (
y==0) {
      return 
0;
    }
  }

Better? :P
__________________

Reply With Quote