Formatting float
How do I make make a float display as an integer? For example I have
PHP Code:
|
Re: Formatting float
To convert a float to int use floatround.
|
Re: Formatting float
Like this?
PHP Code:
First time hearing about floatround, and what are the differences between methods? 2nd parameter of floatround. |
Re: Formatting float
Code:
client_print(id, print_chat, "My var: %i", floatround(gVar));And modes are: Code:
enum floatround_method {floor rounds downwards ( 17.8 -> 17 ) ceil rounds upwards ( 17.3 -> 18 ) tozero rounds toward zero ( -17.7 -> -17 | 17.7 -> 17) |
Re: Formatting float
Thanks
|
Re: Formatting float
Don't remove your posts. If it's solved, just leave the original question so people know what the question was.
Quote:
|
| All times are GMT -4. The time now is 17:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.