aboutsummaryrefslogtreecommitdiffstats
path: root/include/vec3.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/vec3.hpp')
-rw-r--r--include/vec3.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/vec3.hpp b/include/vec3.hpp
index 2fec69e..75b67d2 100644
--- a/include/vec3.hpp
+++ b/include/vec3.hpp
@@ -2,6 +2,14 @@
#define __VEC3_HPP_
#include <xmmintrin.h>
+#include <cstdint>
+
+struct vec3u {
+ union {
+ uint32_t vec[3];
+ uint32_t x, y, z;
+ };
+};
class vec3 {
public:
@@ -24,6 +32,10 @@ class vec3 {
vec3& operator/=(float numerator);
+ vec3 operator<(const vec3& vec) const;
+
+ vec3 operator>(const vec3& vec) const;
+
float operator[](int axis);
[[nodiscard]] float length() const;
@@ -34,10 +46,6 @@ class vec3 {
[[nodiscard]] vec3 cross(const vec3& vec) const;
- [[nodiscard]] vec3 min(const vec3& vec) const;
-
- [[nodiscard]] vec3 max(const vec3& vec) const;
-
vec3& normalize();
[[nodiscard]] bool near_zero() const;