summaryrefslogtreecommitdiff
path: root/themes/mathlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'themes/mathlib.cpp')
-rw-r--r--themes/mathlib.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/themes/mathlib.cpp b/themes/mathlib.cpp
index 702d86c..9e86833 100644
--- a/themes/mathlib.cpp
+++ b/themes/mathlib.cpp
@@ -271,6 +271,11 @@ Vector4 Vector4::toNormalizedColor() {
return fromColor(x, y, z, w);
}
+
+Vector3 Vector4::toVector3() {
+ return { x, y, z };
+}
+
float Vector4::length() {
return sqrtf(x * x + y * y + z * z + w * w);
}