Code:
client_print(id, print_chat, "My var: %i", floatround(gVar));
It
returns the integer representation of a float value.
And modes are:
Code:
enum floatround_method {
floatround_round = 0,
floatround_floor,
floatround_ceil,
floatround_tozero
};
round is just classic rounding (to the nearest int). ( 17.6 -> 18 )
floor rounds downwards ( 17.8 -> 17 )
ceil rounds upwards ( 17.3 -> 18 )
tozero rounds toward zero ( -17.7 -> -17 | 17.7 -> 17)