powf


Description:

public float powf (float x, float y)

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

Note:

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

Example: Calculate x^y (float):

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

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

Parameters:

x

A numeric value.

y

A numeric value.


Namespace: GLib.Math
Package: glib-2.0