summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2021-09-13 04:22:35 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2021-09-13 04:22:35 +0800
commit06c4e56d16d3c4d06434bf920a62ee8926a3db9a (patch)
tree338f5ded87dd1ae324b6a8816d64a6e735fa2111
parent46d5abaf7e6e70cf729d0b30ff1b824b2ac80340 (diff)
reexport nalgebra, add logging on points ord
-rw-r--r--svgbob/Cargo.toml9
-rw-r--r--svgbob/src/lib.rs1
-rw-r--r--svgbob/src/util.rs2
3 files changed, 8 insertions, 4 deletions
diff --git a/svgbob/Cargo.toml b/svgbob/Cargo.toml
index fa4366d..9fc1130 100644
--- a/svgbob/Cargo.toml
+++ b/svgbob/Cargo.toml
@@ -10,14 +10,15 @@ keywords = ["ascii","plain","text", "svg", "bob"]
license = "Apache-2.0"
[dependencies]
-nalgebra = "0.28"
-parry2d = "0.6"
+nalgebra = "0.29"
+parry2d = "0.7"
lazy_static = "1.3.0"
-sauron = { version = "0.43", default-features = false}
-#sauron = { version = "0.43", path = "../../sauron"}
+#sauron = { version = "0.43", default-features = false}
+sauron = { version = "0.43", default-features = false, path = "../../sauron"}
unicode-width = "0.1.5"
itertools = "0.8.0"
pom = { version = "3.1.0" }
+log = "0.4"
diff --git a/svgbob/src/lib.rs b/svgbob/src/lib.rs
index e5e4610..5f64f6e 100644
--- a/svgbob/src/lib.rs
+++ b/svgbob/src/lib.rs
@@ -11,6 +11,7 @@ pub use buffer::{
fragment, fragment::Fragment, Cell, CellBuffer, Direction, FragmentBuffer,
Property, Settings, Signal,
};
+pub use nalgebra;
pub use point::Point;
/// reexport sauron
pub use sauron;
diff --git a/svgbob/src/util.rs b/svgbob/src/util.rs
index 226cfbf..db63681 100644
--- a/svgbob/src/util.rs
+++ b/svgbob/src/util.rs
@@ -12,6 +12,7 @@ pub fn opt_ord(f1: Option<f32>, f2: Option<f32>) -> Ordering {
}
}
+#[track_caller]
pub fn ord(f1: f32, f2: f32) -> Ordering {
if f1 == f2 {
Ordering::Equal
@@ -21,6 +22,7 @@ pub fn ord(f1: f32, f2: f32) -> Ordering {
Ordering::Less
} else {
println!("f1: {}, f2: {}", f1, f2);
+ log::error!("f1: {}, f2: {}", f1, f2);
unreachable!("comparison should only be 3 possibilities")
}
}