Skip to content

Number rounds up erroneously #33

Description

@djasnowski

https://codesandbox.io/s/magical-water-f7f84n?file=/src/index.js:0-164

import millify from "millify";

const OneBelow1Mill = 999999;
const OneBelow100G = 99999;

console.log(millify(OneBelow1Mill));
console.log(millify(OneBelow100G));

Output:

1M
100K

It should be:

999K
99K

Should it not? Why is it rounding up?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions