forked from M-Labs/nalgebra
clippy: fix redundant_closure warnings
This commit is contained in:
parent
726b8eeecf
commit
f515cffad9
@ -520,16 +520,13 @@ where
|
|||||||
let v = self.vector();
|
let v = self.vector();
|
||||||
let nn = v.norm_squared();
|
let nn = v.norm_squared();
|
||||||
let le = nn.simd_le(eps * eps);
|
let le = nn.simd_le(eps * eps);
|
||||||
le.if_else(
|
le.if_else(Self::identity, || {
|
||||||
|| Self::identity(),
|
|
||||||
|| {
|
|
||||||
let w_exp = self.scalar().simd_exp();
|
let w_exp = self.scalar().simd_exp();
|
||||||
let n = nn.simd_sqrt();
|
let n = nn.simd_sqrt();
|
||||||
let nv = v * (w_exp * n.simd_sin() / n);
|
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.
|
/// Raise the quaternion to a given floating power.
|
||||||
|
@ -453,7 +453,7 @@ where
|
|||||||
sqz + (N::one() - sqz) * cos,
|
sqz + (N::one() - sqz) * cos,
|
||||||
))
|
))
|
||||||
},
|
},
|
||||||
|| Self::identity(),
|
Self::identity,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user