summaryrefslogtreecommitdiff
path: root/indra/llmath/v3dmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v3dmath.h')
-rw-r--r--indra/llmath/v3dmath.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h
index d8feb10757..5d414df5d6 100644
--- a/indra/llmath/v3dmath.h
+++ b/indra/llmath/v3dmath.h
@@ -405,5 +405,14 @@ inline BOOL are_parallel(const LLVector3d &a, const LLVector3d &b, const F64 eps
return TRUE;
}
return FALSE;
+
}
+
+inline LLVector3d projected_vec(const LLVector3d &a, const LLVector3d &b)
+{
+ LLVector3d project_axis = b;
+ project_axis.normVec();
+ return project_axis * (a * project_axis);
+}
+
#endif // LL_V3DMATH_H