diff --git a/game/utils.py b/game/utils.py index 119a741a..fbb28d0e 100644 --- a/game/utils.py +++ b/game/utils.py @@ -62,6 +62,8 @@ class Distance: def __mul__(self, other: Union[float, int]) -> Distance: return meters(self.meters * other) + __rmul__ = __mul__ + def __truediv__(self, other: Union[float, int]) -> Distance: return meters(self.meters / other) @@ -147,6 +149,8 @@ class Speed: def __mul__(self, other: Union[float, int]) -> Speed: return kph(self.kph * other) + __rmul__ = __mul__ + def __truediv__(self, other: Union[float, int]) -> Speed: return kph(self.kph / other)