From 073123ce1e65c71689e4c41a6009cbba6340fa3a Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Fri, 8 Dec 2017 10:15:58 +0100 Subject: [PATCH] Implement Neg for Angle. --- src/rotation.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rotation.rs b/src/rotation.rs index 39f7d23..e2da5ac 100644 --- a/src/rotation.rs +++ b/src/rotation.rs @@ -110,6 +110,13 @@ impl> MulAssign for Angle { } } +impl> Neg for Angle { + type Output = Self; + fn neg(self) -> Self { + Angle::radians(-self.radians) + } +} + define_matrix! { /// A transform that can represent rotations in 2d, represented as an angle in radians.