diff --git a/glm/gtx/spaceship.hpp b/glm/gtx/spaceship.hpp index eb0b50d9..f7ad4b1e 100644 --- a/glm/gtx/spaceship.hpp +++ b/glm/gtx/spaceship.hpp @@ -11,6 +11,9 @@ namespace glm template struct vec; + template + struct mat; + template GLM_FUNC_DECL GLM_CONSTEXPR std::strong_ordering operator<=>(const vec& left, const vec& right) { @@ -34,4 +37,19 @@ namespace glm } return std::strong_ordering::equal; } + + template + GLM_FUNC_DECL GLM_CONSTEXPR std::strong_ordering operator<=>(const mat& left, const mat& right) + { + for (int col = 0; col < C; ++col) + { + for (int row = 0; row < R; ++row) + { + if (left[col][row] != right[col][row]) { + return left[col][row] <=> right[col][row]; + } + } + } + return std::strong_ordering::equal; + } } \ No newline at end of file