From a6fe9c2f2c19ec0f37d4cf035ad42e2270224490 Mon Sep 17 00:00:00 2001 From: Slendi Date: Sat, 27 Dec 2025 21:43:35 +0200 Subject: [PATCH] Add const accessors to Quaternion Signed-off-by: Slendi --- include/smath.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/smath.hpp b/include/smath.hpp index 245c161..63e12d9 100644 --- a/include/smath.hpp +++ b/include/smath.hpp @@ -630,9 +630,13 @@ template struct Quaternion : Vec<4, T> { constexpr Base const &vec() const noexcept { return *this; } constexpr T &x() noexcept { return Base::x(); } + constexpr T const &x() const noexcept { return Base::x(); } constexpr T &y() noexcept { return Base::y(); } + constexpr T const &y() const noexcept { return Base::y(); } constexpr T &z() noexcept { return Base::z(); } + constexpr T const &z() const noexcept { return Base::z(); } constexpr T &w() noexcept { return Base::w(); } + constexpr T const &w() const noexcept { return Base::w(); } constexpr auto operator*(Quaternion const &rhs) const noexcept -> Quaternion {