From cba90d630177ce6c57b5537e74ef3eab4e9c1ea2 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sun, 28 Feb 2021 16:52:06 -0300 Subject: Update clang-format to version 11 This is taken from the Godot repository, so formatting is similar. This updates the style rules as well. Also fix style in files to conform with this version. --- src/core/Quat.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/core/Quat.cpp') 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; } -- cgit v1.2.3