diff --git a/math/src/circle/point.rs b/math/src/circle/point.rs index e4fc6000f..e512eb9e3 100644 --- a/math/src/circle/point.rs +++ b/math/src/circle/point.rs @@ -78,6 +78,24 @@ impl> Add for &CirclePoint { CirclePoint { x, y } } } +impl> Add> for CirclePoint { + type Output = CirclePoint; + fn add(self, rhs: CirclePoint) -> Self::Output { + &self + &rhs + } +} +impl> Add> for &CirclePoint { + type Output = CirclePoint; + fn add(self, rhs: CirclePoint) -> Self::Output { + self + &rhs + } +} +impl> Add<&CirclePoint> for CirclePoint { + type Output = CirclePoint; + fn add(self, rhs: &CirclePoint) -> Self::Output { + &self + rhs + } +} /// Multiplication between a point and a scalar (i.e. group operation repeatedly): /// (x, y) * n = (x ,y) + ... + (x, y) n-times.