SA-MP Forums Archive
floatround question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: floatround question (/showthread.php?tid=185138)



floatround question - Sascha - 23.10.2010

Hi guys..
how can I round a float to the first number after the comma?

like round: 16.5472
to: 16.6


Re: floatround question - Slice - 23.10.2010

pawn Код:
new Float:value = 16.615413;

value = floatround( value * 10.0 ) / 10.0;