From e6d8b08df34301c25ab3467da0c0f74f7311b6dc Mon Sep 17 00:00:00 2001 From: Jovansonlee Cesar Date: Tue, 13 Jul 2021 04:22:11 +0800 Subject: repurpose function adjust to use x and y as input as separate value instead of the same --- svgbob/src/point.rs | 6 +++--- 1 file 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) } -- cgit v1.2.3