diff --git a/CMakeLists.txt b/CMakeLists.txt index b88d6e7..fc7b86d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 5.2.26) +set(BLT_VERSION 5.2.27) set(BLT_TARGET BLT) diff --git a/include/blt/math/vectors.h b/include/blt/math/vectors.h index 52d909f..75820bb 100644 --- a/include/blt/math/vectors.h +++ b/include/blt/math/vectors.h @@ -428,6 +428,50 @@ namespace blt return true; } + template <typename T, typename G, u32 size> + constexpr bool operator>=(const vec<T, size>& left, const vec<G, size>& right) + { + for (u32 i = 0; i < size; i++) + { + if (left[i] < right[i]) + return false; + } + return true; + } + + template <typename T, typename G, u32 size> + constexpr bool operator>(const vec<T, size>& left, const vec<G, size>& right) + { + for (u32 i = 0; i < size; i++) + { + if (left[i] <= right[i]) + return false; + } + return true; + } + + template <typename T, typename G, u32 size> + constexpr bool operator<(const vec<T, size>& left, const vec<G, size>& right) + { + for (u32 i = 0; i < size; i++) + { + if (left[i] >= right[i]) + return false; + } + return true; + } + + template <typename T, typename G, u32 size> + constexpr bool operator<=(const vec<T, size>& left, const vec<G, size>& right) + { + for (u32 i = 0; i < size; i++) + { + if (left[i] > right[i]) + return false; + } + return true; + } + template <typename T, typename G, blt::u32 size> inline constexpr bool operator!=(const vec<T, size>& left, const vec<G, size>& right) {