cos(p1)
public
Computes the cosine of x (expressed in radians). Returns -1..1.
Show source
/*
* call-seq:
* Math.cos(x) => float
*
* Computes the cosine of <i>x</i> (expressed in radians). Returns
* -1..1.
*/
static VALUE
math_cos(obj, x)
VALUE obj, x;
{
Need_Float(x);
return rb_float_new(cos(RFLOAT(x)->value));
}