keeping 1 AABB type

This commit is contained in:
2026-03-28 14:22:36 +03:00
parent 33cd3f64e4
commit d8188de736
4 changed files with 16 additions and 38 deletions

View File

@@ -12,5 +12,17 @@ namespace omath::primitives
{
Vector3<Type> min;
Vector3<Type> max;
[[nodiscard]]
constexpr Vector3<Type> center() const noexcept
{
return (min + max) / static_cast<Type>(2);
}
[[nodiscard]]
constexpr Vector3<Type> extents() const noexcept
{
return (max - min) / static_cast<Type>(2);
}
};
} // namespace omath::primitives