round a float val to certain value
#2

If you're interested in using that in format. Use %.1f where 1 is the amount of decimals.

For Example:
Код:
new Float:x = 52.352661, string[64];
format(string, 64, "x = %.2f", x);
Result = 52.35
Reply


Messages In This Thread
round a float val to certain value - by Trooper[Y] - 14.06.2010, 18:01
Re: round a float val to certain value - by Tr1viUm - 14.06.2010, 18:12
Re: round a float val to certain value - by Trooper[Y] - 14.06.2010, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)