Author: Spooner
Author Website:

Requirements: No addons required

Version: 0.1.0

Short description:
Date: 2007-11-21 20:10
Submitted by: Spooner


Comments: (0)
Rating:



 



SPON formatNumber
by
Spooner


Description:
Formats a number to a minimum integer width (e.g. 56 with 3 width would be "056") and/or to a specific number of decimal places (including padding with 0s and correct rounding). Numbers are always displayed fully, never being condensed using an exponent (e.g. the number 1.234e9 would be given as "1234000000").

Additionally, if required, it will separate the integer part of the number with the appropriate localized seperators as, for example, "21,002" or "1,000,000".


Limitations:
Although the function works and will display the passed number correctly, due to the extremely limited accuracy of floating point values used within ArmA (presumably just single-precision / 32 bit), the output might not be as expected after about eight significant figures. Not my fault.


Forum topic:
- OFPEC.com




Download from FTP #1:
SPON formatNumber
Download from FTP #2:
SPON formatNumber
Download from FTP #3:
Size : 1 MB   Downloaded : 221 times     Report broken download link



Tags: No tags