static public Method

Math.atan2(p1, p2)

Math.atan2(y, x)   float

Computes the arc tangent given y and x. Returns -PI..PI.

Source Code

/*
*  call-seq:
*     Math.atan2(y, x)  => float
*  
*  Computes the arc tangent given <i>y</i> and <i>x</i>. Returns
*  -PI..PI.
*     
*/

static VALUE
math_atan2(obj, y, x)
   VALUE obj, x, y;
{
   Need_Float2(y, x);
   return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.