Speed Float
#4

If you had the float value 3.1, the format %01.2f would set the string to "03. 1", which is not what you want.

The way it works, is that you put a 0 in front of a number. That number is the minimum amount of digits. %04f would always return a float with the format XXXX.XXXXX (standard 5 decimals), while the format %04.02f would always return a float with the format XXXX.XX.
Reply


Messages In This Thread
Speed Float - by Akcent_Voltaj - 24.01.2013, 15:29
Re: Speed Float - by DaRk_RaiN - 24.01.2013, 15:31
Re: Speed Float - by Sinner - 24.01.2013, 15:40
Re: Speed Float - by LarzI - 24.01.2013, 15:53
Re: Speed Float - by Akcent_Voltaj - 24.01.2013, 17:19
Re: Speed Float - by Akcent_Voltaj - 24.01.2013, 20:40
Re: Speed Float - by Akcent_Voltaj - 25.01.2013, 11:45
Re: Speed Float - by SAMPHacker - 25.01.2013, 11:56
Re: Speed Float - by Akcent_Voltaj - 25.01.2013, 12:02
Re: Speed Float - by LarzI - 25.01.2013, 12:44

Forum Jump:


Users browsing this thread: 2 Guest(s)