AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   floatround(value, floatround_round) (https://forums.alliedmods.net/showthread.php?t=104854)

xbatista 09-28-2009 09:12

floatround(value, floatround_round)
 
if the value == 0.4 and I will use floatround_round it will do -> 0.0? Otherwise if 0.5 -> 1.0 ?

Hawk552 09-28-2009 09:17

Re: floatround(value, floatround_round)
 
Questions like this are best answered by trial and error since you've already had to wait for me to answer it for about 10 minutes now, but yes.

xbatista 09-28-2009 09:19

Re: floatround(value, floatround_round)
 
Thanks and
Quote:

Questions like this are best answered by trial and error since you've already had to wait for me to answer it for about 10 minutes now
what? :D

SnoW 09-28-2009 09:31

Re: floatround(value, floatround_round)
 
But not. It's a round native, so it returns an integer instead of float like you specifed. So basically floatround_round returns the closest integer and with ~ .500000 the higher one.

ot_207 09-28-2009 09:44

Re: floatround(value, floatround_round)
 
Hawk said that if you would have tested the function you would have got the answer to your question quicker than on the forum.

xbatista 09-28-2009 09:50

Re: floatround(value, floatround_round)
 
Quote:

~ .500000 the higher one.
and I don't need more

I just was lazy to create new file and write client_print :mrgreen:

Exolent[jNr] 09-28-2009 11:31

Re: floatround(value, floatround_round)
 
Quote:

Originally Posted by xbatista (Post 945751)
I just was lazy to create new file and write client_print :mrgreen:

The forum shouldn't be cluttered with useless topics because lazy people don't want to help themselves.


All times are GMT -4. The time now is 22:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.