aboutsummaryrefslogtreecommitdiff
path: root/src/grid.rs
diff options
context:
space:
mode:
authorArne Dußin2020-11-10 23:31:58 +0100
committerArne Dußin2020-11-10 23:31:58 +0100
commit6aabd0123961d90095df3cefefeb0718f94aa6fc (patch)
tree110e3b867ea15b4fbcb1a1ad086ec211e753811a /src/grid.rs
parent94b9d39bd32ced4435951dc7a61612c3ea826b87 (diff)
downloadgraf_karto-6aabd0123961d90095df3cefefeb0718f94aa6fc.tar.gz
graf_karto-6aabd0123961d90095df3cefefeb0718f94aa6fc.zip
Add constant for the grid accuracy
0.5 was used as a magical number throughout the code for that until now, which I now changed.
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs
index ecc59c3..72a849a 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -3,6 +3,9 @@ use crate::transform::Transform;
use raylib::drawing::RaylibDraw;
use raylib::ffi::Color;
+/// The internal grid length which will be used to snap things to it.
+pub const SNAP_SIZE: f32 = 0.5;
+
pub const LINE_COLOUR: Color = Color {
r: 255,
g: 255,