diff --git a/src/scale.rs b/src/scale.rs index 983b366..b98a46d 100644 --- a/src/scale.rs +++ b/src/scale.rs @@ -243,6 +243,18 @@ impl Scale { let one: T = One::one(); Scale::new(one / self.0) } + + /// Returns the same transform with a different source unit. + #[inline] + pub fn with_source(self) -> Scale { + Scale::new(self.0) + } + + /// Returns the same transform with a different destination unit. + #[inline] + pub fn with_destination(self) -> Scale { + Scale::new(self.0) + } } impl Scale {