aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorArne Dußin2021-01-06 22:44:08 +0100
committerGitHub2021-01-06 22:44:08 +0100
commit30b23db9e86fdf72a4e7de72213df274ce19123e (patch)
treeb06b5bf6a21e64ff1bfafff90861532e651352d5 /src/main.rs
parent0eada0bdcb36a9907c6c928aa707ed6bef03c02f (diff)
parent53d376eaeef991850d35318b147f75c8f103319d (diff)
downloadgraf_karto-30b23db9e86fdf72a4e7de72213df274ce19123e.tar.gz
graf_karto-30b23db9e86fdf72a4e7de72213df274ce19123e.zip
Merge pull request #25 from LordSentox/better-polygons
Change to polygongraph instead of polygon in roomtool
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 78be56b..9a08586 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -38,6 +38,7 @@ pub mod transformable;
use cli::CLI;
use config::Config;
use editor::Editor;
+use float_cmp::F64Margin;
use gui::{DimensionIndicator, ToolSidebar};
use raylib::prelude::*;
use std::ffi::CString;
@@ -49,6 +50,14 @@ pub const GUI_STYLE: &str = "assets/style/cyber.rgs";
/// Location of the graf karto configuration options file.
pub const CONFIG_FILE: &str = "config.ron";
+/// The acceptable error that is used throughout the project for two floats to be considered equal.
+/// If it is set too low, the editor might not work properly, if set too high, the granularity may
+/// become too low for certain purposes.
+pub const FLOAT_MARGIN: F64Margin = F64Margin {
+ epsilon: 10000. * f64::EPSILON,
+ ulps: 0,
+};
+
fn main() {
pretty_env_logger::init();