sin


Description:

public double sin (double x)

Returns the sine of x.

Note:

Remember to link the math library: valac -X -lm ...

Example: Sine (double):

public static int main (string[] args) {
// Output: ``sin (0.0) = 0.000000``
double res = Math.sin (0.0);
print ("sin (0.0) = %lf\n", res);

// Output: ``sin (0.5) = 0.479426``
res = Math.sin (0.5);
print ("sin (0.5) = %lf\n", res);

return 0;
}

valac --pkg glib-2.0 -X -lm GLib.Math.sin.vala

Parameters:

x

the given in radians.


Namespace: GLib.Math
Package: glib-2.0