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

Implement more num-traits (e.g. checked arithmetic) #496

Open
Patiga opened this issue Nov 17, 2022 · 2 comments
Open

Implement more num-traits (e.g. checked arithmetic) #496

Patiga opened this issue Nov 17, 2022 · 2 comments

Comments

@Patiga
Copy link

Patiga commented Nov 17, 2022

The num-traits crate has many math traits which are not yet implemented in this crate for points and vectors, such as

  • CheckedAdd: Add with overflow check (also all other checked operations)
  • Zero and One: Additive and multiplicative identity

I am personally missing the checked operations the most, for situations where I really don't want overflows to happen and want to propagate the error with ?.

Are those methods that would be in the scope of this crate?

@nical
Copy link
Contributor

nical commented Nov 17, 2022

Sounds good to me.

@ArtHome12
Copy link
Contributor

@Patiga Can you provide examples of using Zero and One to write a test?

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

3 participants