Skip to content

toStringWithDecimalPlaces throws RangeError on zero #22

@Bazinga9000

Description

@Bazinga9000

Reproduction Steps:
ExpantaNum.ZERO.toStringWithDecimalPlaces(3,true)
raises the following error:

Uncaught RangeError: toFixed() digits argument must be between 0 and 100
    at Number.toFixed (<anonymous>)
    at decimalPlaces (eval at <anonymous> (test.js:102:12), <anonymous>:1213:31)
    at P.toStringWithDecimalPlaces (eval at <anonymous> (test.js:102:12), <anonymous>:1250:28)
    at <anonymous>:1:17

This works in the console on https://naruyoko.github.io/ExpantaNum.js/test.html, and also still errors when replacing 3 with any other integer.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions