servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
459 stars 102 forks source link

Implement `Add/Sub` of `Translation*` for `Point*` #507

Open ids1024 opened 1 year ago

ids1024 commented 1 year ago

Like https://github.com/servo/euclid/pull/506, these exist for the vector types. There doesn't seem to be any reason there shouldn't also work for translation types.

The existing translate methods could be used for subtraction with inv, but that requires a complicated bound involving Inv and Add instead of a Sub bound.