Class Decimal

java.lang.Object
org.mozilla.javascript.dtoa.Decimal

public class Decimal extends Object
This class formats a decimal number into a string representation and stores the result in a buffer. It is highly optimized for the case of formatting a double and only works if the number has a maximum of 17 digits of precision.

Based on code by Guilietti: https://github.com/c4f7fcce9cb06515/Schubfach/blob/3c92d3c9b1fead540616c918cdfef432bca53dfa/todec/src/math/FloatToDecimal.java

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Format the number according to the formatting rules in EcmaScript chapter 6, as defined for the "Number::toString" operation, for radix 10.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Method Details

    • toString

      public String toString()
      Format the number according to the formatting rules in EcmaScript chapter 6, as defined for the "Number::toString" operation, for radix 10.
      Overrides:
      toString in class Object