We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5dd9c5 commit e69c60bCopy full SHA for e69c60b
geo/src/algorithm/affine_ops.rs
@@ -303,17 +303,14 @@ impl<T: CoordNum + Neg> AffineTransform<T> {
303
let inv_det = T::one() / determinant;
304
305
// If conversion of either the b or d matrix value fails, bail out
306
- match (T::from(-b * inv_det), T::from(-d * inv_det)) {
307
- (Some(inv_b), Some(inv_d)) => Some(Self::new(
308
- e * inv_det,
309
- inv_b,
310
- (b * yoff - e * xoff) * inv_det,
311
- inv_d,
312
- a * inv_det,
313
- (d * xoff - a * yoff) * inv_det,
314
- )),
315
- _ => None,
316
- }
+ Some(Self::new(
+ e * inv_det,
+ T::from(-b * inv_det)?,
+ (b * yoff - e * xoff) * inv_det,
+ T::from(-d * inv_det)?,
+ a * inv_det,
+ (d * xoff - a * yoff) * inv_det,
+ ))
317
}
318
319
0 commit comments