Update src/geometry/scale.rs
Simplified code. Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
This commit is contained in:
parent
26e36c15ba
commit
5b44502632
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue