summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2021-07-13 04:22:11 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2021-07-13 04:22:11 +0800
commite6d8b08df34301c25ab3467da0c0f74f7311b6dc (patch)
treee2d9d4f6f0dac1051b0f1dc596b50bb1885ecb56
parentd4fe7977c78bbf6eb8a19b85d94d4b01161dafa0 (diff)
repurpose function adjust to use x and y as input as separate value instead of the same
-rw-r--r--svgbob/src/point.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/svgbob/src/point.rs b/svgbob/src/point.rs
index 7779650..08e0e12 100644
--- a/svgbob/src/point.rs
+++ b/svgbob/src/point.rs
@@ -70,9 +70,9 @@ impl Point {
}
/// adjust both x and y value by units specified
- pub fn adjust(&self, units: f32) -> Self {
- let t = units * CellGrid::unit_x();
- let u = units * CellGrid::unit_y();
+ pub fn adjust(&self, units_x: f32, units_y: f32) -> Self {
+ let t = units_x * CellGrid::unit_x();
+ let u = units_y * CellGrid::unit_y();
Self::new(self.x + t, self.y + u)
}