static public Method

Math.sin(p1)

Math.sin(x)     float

Computes the sine of x (expressed in radians). Returns -1..1.

Source Code

/*
*  call-seq:
*     Math.sin(x)    => float
*  
*  Computes the sine of <i>x</i> (expressed in radians). Returns
*  -1..1.
*/

static VALUE
math_sin(obj, x)
   VALUE obj, x;
{
   Need_Float(x);

   return rb_float_new(sin(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.