Update Line::reverse to reverse "in-place"

This commit is contained in:
Hanno Braun 2023-02-15 11:57:55 +01:00
parent 8fc40594a7
commit f00be2b290

View File

@ -115,6 +115,7 @@ impl<const D: usize> Line<D> {
/// Create a new instance that is reversed
#[must_use]
pub fn reverse(mut self) -> Self {
self.origin += self.direction;
self.direction = -self.direction;
self
}