round a float val to certain value
#1

Hey together.

First of all, im not seeking for floatround.
I want to round this float:
Код:
x.0000
to
Код:
x.0
Im sad, that the wiki nearly have nothing about float-actions...
Reply
#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
#3

thanks alot,
//solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)