SignificantFiguresFormatter
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following example which evaluates to "3.142":
caplin.element.formatter.SignificantFiguresFormatter.format(3.14159, {sf:4})
Attributes | Name and Description |
---|---|
|
caplin.element.formatter.SignificantFiguresFormatter()
|
Attributes | Name and Description |
---|---|
|
String
format(Variant vValue, Map mAttributes)
Formats a number to the specified number of significant figures. |
►
caplin.element.formatter.SignificantFiguresFormatter()
►
String
format(Variant vValue, Map mAttributes)
Formats a number to the specified number of significant figures.
Attribute Options:
Option | Description |
---|---|
sf | the number of significant figures to apply (does nothing if omitted). |
Variant | vValue | the number (String or Number type). |
Map | mAttributes | the map of attributes. |