Format Module
For formatting floats with adaptive precision.
Functions and values
Function or value |
Description
|
Full Usage:
float x
Parameters:
float
Returns: string
|
Formatting with automatic precision. e.g.: 0 digits behind comma if above 1000 If the value is smaller than 'userZeroTolerance' (1e-24) '~0.0' will be shown. If the value is smaller than (1e-7) '≈+0.0' will be shown.
|
Full Usage:
nl
Returns: string
|
|
Full Usage:
single x
Parameters:
float32
Returns: string
|
Formatting with automatic precision. e.g.: 0 digits behind comma if above 1000 If the value is smaller than veryCloseToZero (1e-24) '~0.0' will be shown. If the value is smaller than (1e-6) '≈+0.0' will be shown.
|
Full Usage:
thousandSeparator
Returns: char
|
The newline character for this platform. Set this to change the printing of floats larger than 10'000
|
Full Usage:
trim n
Parameters:
string
Returns: string
|
|
Full Usage:
trimThous n
Parameters:
string
Returns: string
|
|
Full Usage:
userZeroTolerance
Returns: float
|
If the absolut value of a float is below this, display ~0.0 The default is 1e-24 This value can be set for example by hosting apps that have a built-in absolute tolerance like Rhino3d.
|