Package org.mozilla.javascript.dtoa
Class DecimalFormatter
- java.lang.Object
-
- org.mozilla.javascript.dtoa.DecimalFormatter
-
public class DecimalFormatter extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DecimalFormatter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringtoExponential(double v, int fractionDigits)The algorithm of Number.prototype.toExponential.static java.lang.StringtoFixed(double v, int fractionDigits)The algorithm of Number.prototype.toFixed(fractionDigits).static java.lang.StringtoPrecision(double v, int precision)The algorithm of Number.prototype.toPrecision()
-
-
-
Method Detail
-
toExponential
public static java.lang.String toExponential(double v, int fractionDigits)The algorithm of Number.prototype.toExponential. If fractionDigits is < 0, then it indicates the special case that the value was previously undefined, which calls for a different precision for the calculation.
-
toFixed
public static java.lang.String toFixed(double v, int fractionDigits)The algorithm of Number.prototype.toFixed(fractionDigits).
-
toPrecision
public static java.lang.String toPrecision(double v, int precision)The algorithm of Number.prototype.toPrecision()
-
-