Fix ifs clang-format didn’t get

This commit is contained in:
numzero
2023-10-04 21:10:58 +03:00
committed by sfan5
parent e5b97d440a
commit b01a3ea781
25 changed files with 69 additions and 138 deletions

View File

@ -577,8 +577,7 @@ inline quaternion &quaternion::slerp(quaternion q1, quaternion q2, f32 time, f32
angle *= -1.0f;
}
if (angle <= (1 - threshold)) // spherical interpolation
{
if (angle <= (1 - threshold)) { // spherical interpolation
const f32 theta = acosf(angle);
const f32 invsintheta = reciprocal(sinf(theta));
const f32 scale = sinf(theta * (1.0f - time)) * invsintheta;
@ -692,11 +691,9 @@ inline core::quaternion &quaternion::rotationFromTo(const vector3df &from, const
v1.normalize();
const f32 d = v0.dotProduct(v1);
if (d >= 1.0f) // If dot == 1, vectors are the same
{
if (d >= 1.0f) { // If dot == 1, vectors are the same
return makeIdentity();
} else if (d <= -1.0f) // exactly opposite
{
} else if (d <= -1.0f) { // exactly opposite
core::vector3df axis(1.0f, 0.f, 0.f);
axis = axis.crossProduct(v0);
if (axis.getLength() == 0) {