acos(p1)
public
Computes the arc cosine of x. Returns 0..PI.
Show source
/*
* 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);
}