Quaternion/Vector: Small refactor for review: put more comments, switched type conversions, took out default destination vector because confusing

This commit is contained in:
Matthias Grob
2017-12-04 15:34:13 +01:00
parent af2610ec04
commit f835d39017
3 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ public:
Type norm_squared() const {
const Vector &a(*this);
return Type(a.dot(a));
return a.dot(a);
}
inline Type length() const {
@@ -88,7 +88,7 @@ public:
return (*this) / norm();
}
Vector unit_or_zero(const Type eps = 1e-5f) {
Vector unit_or_zero(const Type eps = Type(1e-5)) {
const Type n = norm();
if (n > eps) {
return (*this) / n;