summaryrefslogtreecommitdiff
path: root/core/math/vector4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/vector4.cpp')
-rw-r--r--core/math/vector4.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/vector4.cpp b/core/math/vector4.cpp
index 9fd980aaff..3b189f7ed4 100644
--- a/core/math/vector4.cpp
+++ b/core/math/vector4.cpp
@@ -64,6 +64,10 @@ bool Vector4::is_zero_approx() const {
return Math::is_zero_approx(x) && Math::is_zero_approx(y) && Math::is_zero_approx(z) && Math::is_zero_approx(w);
}
+bool Vector4::is_finite() const {
+ return Math::is_finite(x) && Math::is_finite(y) && Math::is_finite(z) && Math::is_finite(w);
+}
+
real_t Vector4::length() const {
return Math::sqrt(length_squared());
}