diff --git a/crates/fj-math/src/line.rs b/crates/fj-math/src/line.rs index c2a6c513f..c46821983 100644 --- a/crates/fj-math/src/line.rs +++ b/crates/fj-math/src/line.rs @@ -115,6 +115,7 @@ impl Line { /// Create a new instance that is reversed #[must_use] pub fn reverse(mut self) -> Self { + self.origin += self.direction; self.direction = -self.direction; self } diff --git a/crates/fj-math/src/point.rs b/crates/fj-math/src/point.rs index d52997974..83b06f63a 100644 --- a/crates/fj-math/src/point.rs +++ b/crates/fj-math/src/point.rs @@ -164,6 +164,15 @@ where } } +impl ops::AddAssign for Point +where + V: Into>, +{ + fn add_assign(&mut self, rhs: V) { + *self = *self + rhs; + } +} + impl ops::Sub for Point where V: Into>, diff --git a/crates/fj-math/src/vector.rs b/crates/fj-math/src/vector.rs index 9dd6d57ce..d30bd745f 100644 --- a/crates/fj-math/src/vector.rs +++ b/crates/fj-math/src/vector.rs @@ -323,6 +323,15 @@ where } } +impl ops::MulAssign for Vector +where + S: Into, +{ + fn mul_assign(&mut self, rhs: S) { + *self = *self * rhs; + } +} + impl ops::Div for Vector where S: Into,