Implement `std::ops::Sub` for `Point`.
Opened this issue · 0 comments
OrangeTux commented
A Vector
is just the difference between 2 Point
s. For example, the Vector (5, 1)
is the difference between Point (3, 5)
and Point (8, 6)
.
In other words: Point
- Point
= Vector
. We can reflect that in Rust by implementing the std::ops::Sub
trait for Point
.