cosf


Description:

public float cosf (float x)

Returns the cosine of x.

Note:

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

Example: Cosine (float):

public static int main (string[] args) {
// Output: ``cosf (1.042310f) = 0.504227f``
float x = 1.04231f;
float result = Math.cosf (x);
print ("cosf (%lff) = %lff\n", x, result);
return 0;
}

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

Parameters:

x

the given in radians.


Namespace: GLib.Math
Package: glib-2.0