Public Member Functions | |
| Format (Map specifiers) | |
| String | format (Number value) |
| Number | getResultingValue (Number value) |
| Number | getError (Number value) |
| Boolean | isSignificant (Number value) |
| Boolean | areDifferent (Number a, Number b) |
| Number | getMinimumValue () |
Format specification and formatter.
Constructs the format specification for the given values. See createFormat().
| specifiers | The format specifiers. |
The supported specifiers are:
decimals: Specifies the number of decimals. Defaults to 6.trim: Specifies that ending zero decimals should be trimming. Defaults to true.trimLeadZero: Specifies that the leading zero should be excluded. Eg. ".123" instead of "0.123". Defaults to false.forceSign: Specifies that the '+'-sign must be included for positive numbers. Defaults to false.forceDecimal: Specifies that the decimal symbol must be included. Defaults to false.zeropad: Specifies that zeros should be padded to the resulting string to fit the given width. Defaults to false.width: Specifies the width of the resulting string. Defaults to 0.separator: Specifies the decimal symbol. Defaults to '.'.cyclicLimit: Specifies the cyclic limit. Defaults to 0 (disabled).cyclicSign: Specifies the cyclic sign. Defaults to 0.scale: Specifies the scale. Defaults to 1.offset: Specifies the offset. Defaults to 0.prefix: Specifies the prefix. Defaults to empty string.suffix: Specifies the suffix. Defaults to empty string.inherit: Specifies the format to inherit.Returns true if the specified values are different when formatted.
Returns the error for the specified value.
| Number getMinimumValue | ( | ) |
Returns the minimum epsilon value.
Returns the resulting value for the specified value.
Returns true if the specified value would be non-zero when formatted. See areDifferent() for comparing 2 values.