ignorance and intolerance in computing communties

Ignoramus12143 ignoramus12143 at NOSPAM.12143.invalid
Thu May 3 11:01:21 EDT 2007


It is not that difficult to those of us who know math. Obvious analogy
to the function below exists in 'perl'. 

double vectorAngle( double x, double y ) 
{
  double r2 = x*x+y*y;
  if( r2 == 0 ) return -10; // error case

  int quadrant = x > 0 ? (y >= 0 : 0 : 3) : (y > 0 ? 1 : 2);

  return pi/2 * quadrant + asin( abs(y)/sqrt( r2 ) );
} 



More information about the Python-list mailing list