Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a static ZERO costant #159

Open
demanzano opened this issue Sep 3, 2020 · 2 comments
Open

add a static ZERO costant #159

demanzano opened this issue Sep 3, 2020 · 2 comments

Comments

@demanzano
Copy link

maybe there is and I'vent seen, but..

I think it would be very useful and convenient to have a static costant for the zero valure.

Something like:

import {Decimal} from 'decimal.js';
let myvar = Decimal.ZERO;

exactly as in Java's BigDecimal class (which to be honest exports also other values, like ONE, TWO etc. to 10.

This would be useful to avoid make an instance in every file / class where zero is needed, and should be very very easy to implement in Decimal.js

thanks

Ale

@MikeMcl
Copy link
Owner

MikeMcl commented Sep 3, 2020

Okay, I'll consider it for the upcoming update.

@demanzano
Copy link
Author

thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants