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 signum #320

Open
Azmisov opened this issue Feb 16, 2022 · 0 comments
Open

Add signum #320

Azmisov opened this issue Feb 16, 2022 · 0 comments

Comments

@Azmisov
Copy link

Azmisov commented Feb 16, 2022

Would be nice to add this:

// returns +/-1 giving the number's sign, except when value is zero, in which +/-0 is returned
P.signum = function () {
    return !!this.c && this.c[0] == 0 ? this.s*0 : this.s;
};

(May be a better way to just return the signed zero value)

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
@Azmisov and others