static public Method

Math.acos(p1)

Math.acos(x)     float

Computes the arc cosine of x. Returns 0..PI.

Source Code

/*
*  call-seq:
*     Math.acos(x)    => float
*  
*  Computes the arc cosine of <i>x</i>. Returns 0..PI.
*/

static VALUE
math_acos(obj, x)
   VALUE obj, x;
{
   double d;

   Need_Float(x);
   errno = 0;
   d = acos(RFLOAT(x)->value);
   domain_check(d, "acos");
   return rb_float_new(d);
}
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.