Added normalized() to VectorT.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@557 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Hans-Christian Ebke
2012-03-19 08:25:50 +00:00
parent 2b25dba5fb
commit b240c21f7c

View File

@@ -426,6 +426,14 @@ public:
return *this;
}
/** return normalized vector
*/
inline const vector_type normalized() const
{
return *this / norm();
}
/** normalize vector, return normalized vector and avoids div by zero
*/
inline vector_type& normalize_cond()