Format Module
A module with functions for formatting floats with adaptive precision.
Nested modules
| Modules | Description |
|
|
Functions and values
| Function or value |
Description
|
Full Usage:
addThousandSeparators thousandSeparator number
Parameters:
char
number : string
Returns: string
|
Insert thousand separators into a string representing a float or int. Before and after the decimal point. Assumes a string that represent a float or int with '.' as decimal separator and no other input formatting.
|
Full Usage:
float x
Parameters:
float
Returns: string
|
Formatting double precision floating point numbers 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. The global thousand separator, a tick (') is used if more than 3 digits are next to each other before and after the comma. change it at 'Euclid.Format.globalThousandSeparator'
|
Full Usage:
floatWithSeparator thousandSeparator x
Parameters:
char
x : float
Returns: string
|
Formatting double precision floating point numbers 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. The thousand separator character is used if more than 3 digits are next to each other before and after the comma. If the separator is the NUL character '\000' no separator will be added.
|
Full Usage:
globalThousandSeparator
Returns: char
|
The global thousand separator character is used by 'Euclid.Format.float' and 'Euclid.Format.single' if more than 3 digits are next to each other before and after the comma. If the separator is the NUL character '\000' no separator will be added.
|
|
|
Full Usage:
nl
Returns: string
|
The newline character for this platform. Just short for System.Environment.NewLine
|
Full Usage:
rarr xs
Parameters:
ResizeArray<'T>
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.
|
Euclid