servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 103 forks source link

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

Open Patiga opened 1 year ago

Patiga commented 1 year ago

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

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 commented 1 year ago

Sounds good to me.

ArtHome12 commented 1 year ago

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