floorf


Description:

public float floorf (float x)

Rounds x down to the nearest integer.

Note:

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

Example: Rounds x downward (float):

public static int main (string[] args) {
// Output:
// ``floorf (3.1f) = 3.0f``
// ``floorf (3.9f) = 3.0f``
print ("floorf (%.1lff) = %.1lff\n", 3.1f, Math.floorf (3.1f));
print ("floorf (%.1lff) = %.1lff\n", 3.9f, Math.floorf (3.9f));
return 0;
}

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

Parameters:

x

A numeric value.


Namespace: GLib.Math
Package: glib-2.0