From b4d24e8f2cb4838acc0b827f007e7faa609039ba Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 24 Dec 2025 15:35:21 +0100 Subject: Use build.bat for building Everything is included in main.cpp Do not rely on vcpkg anymore --- include/vec3.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include/vec3.hpp') diff --git a/include/vec3.hpp b/include/vec3.hpp index 968f3ed..42172e6 100644 --- a/include/vec3.hpp +++ b/include/vec3.hpp @@ -41,7 +41,13 @@ class vec3 { [[nodiscard]]vec3 (min)(const vec3& vec) const; [[nodiscard]]vec3 (max)(const vec3& vec) const; - float operator[](int axis); + template + [[nodiscard]] float get() const; + + template + void set(float val); + + [[nodiscard]] float operator[](int axis) const; [[nodiscard]] float length() const; @@ -61,7 +67,10 @@ class vec3 { static vec3 random(float min, float max); - __m128 v; + union { + __m128 v; + float arr[4]; + }; }; vec3 lerp(const vec3& u, const vec3& v, float t); -- cgit v1.3