diff options
Diffstat (limited to 'src/geom/transform.rs')
| -rw-r--r-- | src/geom/transform.rs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/geom/transform.rs b/src/geom/transform.rs index de2a9781..961ba487 100644 --- a/src/geom/transform.rs +++ b/src/geom/transform.rs @@ -26,26 +26,12 @@ impl Transform { /// Transform by mirroring along the x-axis. pub fn mirror_x() -> Self { - Self { - sx: Ratio::one(), - ky: Ratio::zero(), - kx: Ratio::zero(), - sy: -Ratio::one(), - tx: Length::zero(), - ty: Length::zero(), - } + Self::scale(Ratio::one(), -Ratio::one()) } /// Transform by mirroring along the y-axis. pub fn mirror_y() -> Self { - Self { - sx: -Ratio::one(), - ky: Ratio::zero(), - kx: Ratio::zero(), - sy: Ratio::one(), - tx: Length::zero(), - ty: Length::zero(), - } + Self::scale(-Ratio::one(), Ratio::one()) } /// A translate transform. |
