euclid icon indicating copy to clipboard operation
euclid copied to clipboard

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

Open Patiga opened this issue 3 years ago • 2 comments

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?

Patiga avatar Nov 17 '22 11:11 Patiga

Sounds good to me.

nical avatar Nov 17 '22 13:11 nical

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

ArtHome12 avatar Apr 10 '23 01:04 ArtHome12