clippy: fix #needless_return
This commit is contained in:
parent
6293d3375b
commit
1624a87efa
|
@ -492,18 +492,18 @@ where
|
||||||
|
|
||||||
// The cosinus may be out of [-1, 1] because of inaccuracies.
|
// The cosinus may be out of [-1, 1] because of inaccuracies.
|
||||||
if cos <= -N::one() {
|
if cos <= -N::one() {
|
||||||
return None;
|
None
|
||||||
} else if cos >= N::one() {
|
} else if cos >= N::one() {
|
||||||
return Some(Self::identity());
|
Some(Self::identity())
|
||||||
} else {
|
} else {
|
||||||
return Some(Self::from_axis_angle(&axis, cos.acos() * s));
|
Some(Self::from_axis_angle(&axis, cos.acos() * s))
|
||||||
}
|
}
|
||||||
} else if na.dot(&nb) < N::zero() {
|
} else if na.dot(&nb) < N::zero() {
|
||||||
// PI
|
// PI
|
||||||
//
|
//
|
||||||
// The rotation axis is undefined but the angle not zero. This is not a
|
// The rotation axis is undefined but the angle not zero. This is not a
|
||||||
// simple rotation.
|
// simple rotation.
|
||||||
return None;
|
None
|
||||||
} else {
|
} else {
|
||||||
// Zero
|
// Zero
|
||||||
Some(Self::identity())
|
Some(Self::identity())
|
||||||
|
|
Loading…
Reference in New Issue