Update src/geometry/scale.rs

Simplified code.

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
This commit is contained in:
Yuri6037 2021-10-24 20:27:38 +02:00 committed by GitHub
parent 26e36c15ba
commit 5b44502632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,10 +369,7 @@ impl<T: Scalar + ClosedDiv + ClosedMul + One + Zero, const D: usize> Scale<T, D>
#[inline] #[inline]
#[must_use] #[must_use]
pub fn try_inverse_transform_point(&self, pt: &Point<T, D>) -> Option<Point<T, D>> { pub fn try_inverse_transform_point(&self, pt: &Point<T, D>) -> Option<Point<T, D>> {
if let Some(s) = self.try_inverse() { self.try_inverse().map(|s| s * pt)
return Some(s * pt);
}
return None;
} }
} }