summaryrefslogtreecommitdiffstats
path: root/src/core/Quat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Quat.cpp')
-rw-r--r--src/core/Quat.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/Quat.cpp b/src/core/Quat.cpp
index dc179e2..9e3cfe7 100644
--- a/src/core/Quat.cpp
+++ b/src/core/Quat.cpp
@@ -100,7 +100,6 @@ Quat Quat::inverse() const {
}
Quat Quat::slerp(const Quat &q, const real_t &t) const {
-
Quat to1;
real_t omega, cosom, sinom, scale0, scale1;
@@ -144,12 +143,12 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
}
Quat Quat::slerpni(const Quat &q, const real_t &t) const {
-
const Quat &from = *this;
real_t dot = from.dot(q);
- if (::fabs(dot) > 0.9999) return from;
+ if (::fabs(dot) > 0.9999)
+ return from;
real_t theta = ::acos(dot),
sinT = 1.0 / ::sin(theta),
@@ -200,7 +199,6 @@ Quat Quat::operator*(const Vector3 &v) const {
}
Vector3 Quat::xform(const Vector3 &v) const {
-
Quat q = *this * v;
q *= this->inverse();
return Vector3(q.x, q.y, q.z);
@@ -234,7 +232,6 @@ Quat::Quat(const Vector3 &v0, const Vector3 &v1) // shortest arc
z = 0;
w = 0;
} else {
-
real_t s = ::sqrt((1.0 + d) * 2.0);
real_t rs = 1.0 / s;
@@ -282,7 +279,6 @@ void Quat::operator*=(const real_t &s) {
}
void Quat::operator/=(const real_t &s) {
-
*this *= 1.0 / s;
}