Class DecimalFormatter
java.lang.Object
org.mozilla.javascript.dtoa.DecimalFormatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoExponential(double v, int fractionDigits) The algorithm of Number.prototype.toExponential.static StringtoFixed(double v, int fractionDigits) The algorithm of Number.prototype.toFixed(fractionDigits).static StringtoPrecision(double v, int precision) The algorithm of Number.prototype.toPrecision()
-
Constructor Details
-
DecimalFormatter
public DecimalFormatter()
-
-
Method Details
-
toExponential
The algorithm of Number.prototype.toExponential. If fractionDigits is invalid input: '<' 0, then it indicates the special case that the value was previously undefined, which calls for a different precision for the calculation. -
toFixed
The algorithm of Number.prototype.toFixed(fractionDigits). -
toPrecision
The algorithm of Number.prototype.toPrecision()
-