diff --git a/experiments/2024-12-09/src/math/scalar.rs b/experiments/2024-12-09/src/math/scalar.rs index d2a0d85f9..55be2adf9 100644 --- a/experiments/2024-12-09/src/math/scalar.rs +++ b/experiments/2024-12-09/src/math/scalar.rs @@ -73,6 +73,15 @@ where } } +impl ops::Neg for Scalar { + type Output = Self; + + fn neg(self) -> Self::Output { + let value = -self.value(); + Self::new(value) + } +} + impl ops::Sub for Scalar where S: Into,