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:
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
|
Set this to change the printing of floats larger than 10'000
|
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 build in absolute tolerance like Rhino3d.
|