diff --git a/src/geometry/quaternion.rs b/src/geometry/quaternion.rs index 8c4537dc..3d2e6d0d 100755 --- a/src/geometry/quaternion.rs +++ b/src/geometry/quaternion.rs @@ -520,16 +520,13 @@ where let v = self.vector(); let nn = v.norm_squared(); let le = nn.simd_le(eps * eps); - le.if_else( - || Self::identity(), - || { - let w_exp = self.scalar().simd_exp(); - let n = nn.simd_sqrt(); - let nv = v * (w_exp * n.simd_sin() / n); + le.if_else(Self::identity, || { + let w_exp = self.scalar().simd_exp(); + let n = nn.simd_sqrt(); + let nv = v * (w_exp * n.simd_sin() / n); - Self::from_parts(w_exp * n.simd_cos(), nv) - }, - ) + Self::from_parts(w_exp * n.simd_cos(), nv) + }) } /// Raise the quaternion to a given floating power. diff --git a/src/geometry/rotation_specialization.rs b/src/geometry/rotation_specialization.rs index 11b63cde..5cb7cb33 100644 --- a/src/geometry/rotation_specialization.rs +++ b/src/geometry/rotation_specialization.rs @@ -453,7 +453,7 @@ where sqz + (N::one() - sqz) * cos, )) }, - || Self::identity(), + Self::identity, ) }