Limiting decimal part of a float.
Who wants to show the 15 numbers decimal number?
%01f just doesn't work. |
Re: Limiting decimal part of a float.
Try %0.15f or %15.0f, I don't understand witch part do you want, before or after "."
|
Re: Limiting decimal part of a float.
Quote:
15.432 Or because of the "0" it has just will display .432 |
Re: Limiting decimal part of a float.
Nevermind, worked as expected.
%0.1f will show 123.1 for example. |
Re: Limiting decimal part of a float.
I'm not sure what 0 does, but if you want 15 digits after "." and X digits before use %X.15f, if %0.15f fails.
|
Re: Limiting decimal part of a float.
Quote:
%1.1f it will show 1 absolute digit, 1 decimal digit. |
Re: Limiting decimal part of a float.
http://www.cplusplus.com/reference/c...stdio/fprintf/
it uses the same syntax except some things which won't work in pawn. |
Re: Limiting decimal part of a float.
still can not understand how to display the integer part of a float.
example: a = 123.456 Archine, how can I display the "123"?? appear without the dot "." ? PHP Code:
this way I can view the entire piece, but it appears the "." display only the decimal part? |
Re: Limiting decimal part of a float.
Round it and display it as an integer?
|
Re: Limiting decimal part of a float.
I tried to explain the best way, but do not understand what you wrote, I do not speak English.
I want to format the floating and take only the integer part, how can I do this ?????? |
| All times are GMT -4. The time now is 04:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.