diff --git a/CMakeLists.txt b/CMakeLists.txt index 41318a2..a994628 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.28) +set(BLT_VERSION 5.2.29) set(BLT_TARGET BLT) diff --git a/include/blt/math/aabb.h b/include/blt/math/aabb.h index 4fdc0a3..e0c94c4 100644 --- a/include/blt/math/aabb.h +++ b/include/blt/math/aabb.h @@ -55,6 +55,11 @@ namespace blt return m_max; } + [[nodiscard]] T length() const + { + return m_max - m_min; + } + private: T m_min, m_max; }; @@ -78,7 +83,7 @@ namespace blt { vec size; for (u32 i = 0; i < Axis; i++) - size[i] = m_axes[i].max() - m_axes[i].min(); + size[i] = m_axes[i].length(); return size; }