Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/moto/include/MT_Vector3.inl')
-rw-r--r--intern/moto/include/MT_Vector3.inl7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/moto/include/MT_Vector3.inl b/intern/moto/include/MT_Vector3.inl
index b17ef47c709..09c92c6ab54 100644
--- a/intern/moto/include/MT_Vector3.inl
+++ b/intern/moto/include/MT_Vector3.inl
@@ -77,6 +77,13 @@ GEN_INLINE MT_Vector3 MT_Vector3::safe_normalized() const {
*this / len;
}
+GEN_INLINE MT_Vector3 MT_Vector3::safe_normalized_vec(MT_Vector3 vecnormalized) const {
+ MT_Scalar len = length();
+ return MT_fuzzyZero(len) ?
+ vecnormalized :
+ *this / len;
+}
+
GEN_INLINE void MT_Vector3::scale(MT_Scalar xx, MT_Scalar yy, MT_Scalar zz) {
m_co[0] *= xx; m_co[1] *= yy; m_co[2] *= zz;
}