summaryrefslogtreecommitdiff
path: root/include/m
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2024-09-12 22:23:11 +0200
committerGitHub <noreply@github.com>2024-09-12 16:23:11 -0400
commite2c4bb7be7fa731a335bce4bc22283d899133e39 (patch)
tree91152d84cae384b376f4ce4c87e9e247255ec954 /include/m
parent9aa30ee4995be938e1ea05f6d476d63fcb8cc67e (diff)
Dowsing (#17)
* Dowsing. * d_t_dowsing * d_t_holy_water OK
Diffstat (limited to 'include/m')
-rw-r--r--include/m/m_vec.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/m/m_vec.h b/include/m/m_vec.h
index f7ba025d..1009f7a1 100644
--- a/include/m/m_vec.h
+++ b/include/m/m_vec.h
@@ -122,7 +122,7 @@ public:
/// @brief Scalar product operator.
mVec3_c operator*(f32 f) const {
- return mVec3_c(f * x, f * y, f * z);
+ return mVec3_c(x * f, y * f, z * f);
}
/// @brief Scalar division operator.
@@ -140,6 +140,18 @@ public:
bool operator!=(const mVec3_c &v) const {
return x != v.x || y != v.y || z != v.z;
}
+
+ void normalize();
+ bool normalizeRS();
+
+ inline f32 mag() const {
+ return PSVECMag(*this);
+ }
+
+ static mVec3_c Zero;
+ static mVec3_c Ex;
+ static mVec3_c Ey;
+ static mVec3_c Ez;
};
#endif