From 18cf653affc41afd175d1ea7ffa45203ace0bdf2 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 5 Aug 2024 11:58:53 +0200 Subject: [PATCH] Added scaling support --- Angle.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Angle.h b/Angle.h index 6b15e6f..328354b 100644 --- a/Angle.h +++ b/Angle.h @@ -36,6 +36,13 @@ class AngleOf { AngleOf operator-(const AngleOf& a) const; AngleOf operator+(const AngleOf& a) const; + friend AngleOf operator*(const AngleOf& a, float f) { + return AngleOf((float)a.ToFloat() * f); + } + friend AngleOf operator*(float f, const AngleOf& a) { + return AngleOf((float)f * a.ToFloat()); + } + static AngleOf Normalize(AngleOf a); static AngleOf Clamp(AngleOf a, AngleOf min, AngleOf max); static AngleOf Difference(AngleOf a, AngleOf b) {