acos(p1)
public
Computes the arc cosine of x. Returns 0..PI.
Show source
static VALUE
math_acos(VALUE obj, VALUE x)
{
double d0, d;
Need_Float(x);
d0 = RFLOAT_VALUE(x);
/* check for domain error */
if (d0 < -1.0 || 1.0 < d0) domain_error("acos");
d = acos(d0);
return DBL2NUM(d);
}