aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorArne Dußin2020-11-27 22:55:00 +0100
committerArne Dußin2020-11-27 22:55:00 +0100
commit4c4b57dc24bc36b3091931c9dcc36f6b1894a017 (patch)
tree83f835eb850f249eff2e7694707464c9d4713a69 /src/main.rs
parent99e935b63bb023cfd46c8f3d81074d3faf7ce592 (diff)
downloadgraf_karto-4c4b57dc24bc36b3091931c9dcc36f6b1894a017.tar.gz
graf_karto-4c4b57dc24bc36b3091931c9dcc36f6b1894a017.zip
Change to f64 as the preferred floating point number
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index f669ec6..7e04456 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -73,7 +73,7 @@ fn main() {
// Move the canvas together with the mouse
if rl.is_mouse_button_down(MouseButton::MOUSE_MIDDLE_BUTTON) {
- transform.move_by_px((rl.get_mouse_position() - last_mouse_pos).into());
+ transform.move_by_px(&(rl.get_mouse_position() - last_mouse_pos).into());
}
let mouse_wheel_move = rl.get_mouse_wheel_move();
@@ -81,8 +81,8 @@ fn main() {
// Zoom in for positive and zoom out for negative mouse wheel rotations.
let scale_factor = if mouse_wheel_move > 0 { 1.2 } else { 1. / 1.2 };
transform.try_zoom(
- rl.get_mouse_position().into(),
- mouse_wheel_move.abs() as f32 * scale_factor,
+ &rl.get_mouse_position().into(),
+ mouse_wheel_move.abs() as f64 * scale_factor,
);
}