RoundingFormatter
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.RoundingFormatter.format(3.14159, {dp:3})
Attributes | Name and Description |
---|---|
|
caplin.element.formatter.RoundingFormatter()
|
Attributes | Name and Description |
---|---|
|
String
format(Variant vValue, Map mAttributes)
Formats the number to the specified precision. |
►
caplin.element.formatter.RoundingFormatter()
►
String
format(Variant vValue, Map mAttributes)
Formats the number to the specified precision.
Attribute Options:
Option | Description |
---|---|
sf | the number of significant figures to apply (optional) | dp | the number of decimal places to apply (optional) | rounding | the number of decimal places to be rounded, omitting any trailing zeros (optional) |
Variant | vValue | the number. |
Map | mAttributes | the map of attributes. |