sinf


Description:

public float sinf (float x)

Returns the sine of x, where x is given in radians.

Note:

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

Example: Sine (float):

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

// Output: ``sinf (0.5f) = 0.479426f``
res = Math.sinf (0.5f);
print ("sinf (0.5f) = %lff\n", res);

return 0;
}

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


Namespace: GLib.Math
Package: glib-2.0