Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43885

JavaScript Number.prototype.toFixed rounding error before decimal point

XMLWordPrintable

    • c3effc6cd3a66b6c02048d8ad85c7ed3bb3c1463

      Number.toFixed doesn't round before the decimal point.
      (12.5).toFixed() returns 12. It should return 13.

      Note that rounding after the decimal point is correct:
      (12.05).toFixed(1) yields 12.1.

      In Quick1, the return value is correct.

        For Gerrit Dashboard: QTBUG-43885
        # Subject Branch Project Status CR V

            erikv Erik Verbruggen
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes