summary refs log tree commit diff
path: root/src/Math/Vector.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Math/Vector.hpp')
-rw-r--r--src/Math/Vector.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Math/Vector.hpp b/src/Math/Vector.hpp
index 7d07d5c..3525e42 100644
--- a/src/Math/Vector.hpp
+++ b/src/Math/Vector.hpp
@@ -125,6 +125,15 @@ struct Vector {
         return mostly_equal(zero());
     }
 
+    Bool is_nan() const {
+        for (UInt i = 0; i < S; i++) {
+            if (std::isnan(elements[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     T operator[](USize index) const {
         return elements[index];
     }