diff --git a/src/tools/coordinate.py b/src/tools/coordinate.py index 139c4ef..8ab4e62 100644 --- a/src/tools/coordinate.py +++ b/src/tools/coordinate.py @@ -290,6 +290,12 @@ class Coordinate(tuple): else: return self.__class__(self[0] * other, self[1] * other, self[2] * other) + def __mod__(self, other: int) -> Coordinate: + if self[2] is None: + return self.__class__(self[0] % other, self[1] % other) + else: + return self.__class__(self[0] % other, self[1] % other, self[2] % other) + def __floordiv__(self, other: int | float) -> Coordinate: if self[2] is None: return self.__class__(self[0] // other, self[1] // other)