summaryrefslogtreecommitdiff
path: root/indra/llmath/v3dmath.h
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-01-09 20:19:31 +0000
committerJosh Bell <josh@lindenlab.com>2007-01-09 20:19:31 +0000
commit8c344f4da02105428c5933501d028a4a8908a657 (patch)
tree1463f67247c48a7420620917aa7fde5d6a810820 /indra/llmath/v3dmath.h
parent8534623734e64387736ddb76683939104d796ade (diff)
svn merge -r 56560:56599 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
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