From 993d828c3c2cdab6174e460c39a605dbd31d192c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 11 Apr 2023 22:40:54 +0200 Subject: bbb --- src/global-coords.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/global-coords.hpp b/src/global-coords.hpp index 6d8e1525..a5f9dff0 100644 --- a/src/global-coords.hpp +++ b/src/global-coords.hpp @@ -54,6 +54,8 @@ struct chunk_coords_ final { template constexpr chunk_coords_& operator-=(Math::Vector2 off) noexcept { x = int16_t(x - int{off.x()}); y = int16_t(y - int{off.y()}); z = int8_t(z - off.z()); return *this; } + + Vector3i operator-(chunk_coords_ other) const noexcept { return Vector3i{x - other.x, y - other.y, z - other.z}; } }; constexpr inline int8_t chunk_z_min = -1, chunk_z_max = 14; -- cgit v1.2.3