summaryrefslogtreecommitdiff
path: root/src/geom/transform.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-07 18:04:29 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-07 18:04:29 +0200
commit4bb6240b401605ef6d905273db07545e14f9a21f (patch)
treeb01163a5fce3fe62d16abcbdabf37bc373617ff1 /src/geom/transform.rs
parent1192132dc0a9e991953fd29e93f87c8437a53ea0 (diff)
Make `Relative` generic
Diffstat (limited to 'src/geom/transform.rs')
-rw-r--r--src/geom/transform.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/geom/transform.rs b/src/geom/transform.rs
index 8d64ebcf..c0a06e33 100644
--- a/src/geom/transform.rs
+++ b/src/geom/transform.rs
@@ -24,18 +24,18 @@ impl Transform {
}
}
- /// A translation transform.
- pub const fn translation(tx: Length, ty: Length) -> Self {
+ /// A translate transform.
+ pub const fn translate(tx: Length, ty: Length) -> Self {
Self { tx, ty, ..Self::identity() }
}
- /// A scaling transform.
+ /// A scale transform.
pub const fn scale(sx: Ratio, sy: Ratio) -> Self {
Self { sx, sy, ..Self::identity() }
}
- /// A rotation transform.
- pub fn rotation(angle: Angle) -> Self {
+ /// A rotate transform.
+ pub fn rotate(angle: Angle) -> Self {
let cos = Ratio::new(angle.cos());
let sin = Ratio::new(angle.sin());
Self {