tan


Description:

public double tan (double x)

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

Note:

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

Example: Tangent (double):

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

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

return 0;
}

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


Namespace: GLib.Math
Package: glib-2.0