pow10f


Description:

[ CCode ( feature_test_macro = "_GNU_SOURCE" ) ]
public float pow10f (float x)

Returns the value of 10 raised to the power of x.

Note:

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

Example: Calculate 10^x (float):

public static int main (string[] args) {
// Output: ``10^2 = pow10f (2.0f) = 100.000000f``
float res = Math.pow10f (2.0f);
print ("10^2 = pow10f (2.0f) = %lff\n", res);
return 0;
}

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

Parameters:

x

A numeric value.


Namespace: GLib.Math
Package: glib-2.0