WIP: Wall intersection
[kaka/rust-sdl-test.git] / src / common / mod.rs
index 9c39453..505860d 100644 (file)
@@ -1,8 +1,22 @@
 mod geometry;
-pub use common::geometry::Point;
-pub use common::geometry::Dimension;
-pub use common::geometry::Radians;
-pub use common::geometry::Degrees;
+pub use common::geometry::{
+    Point,
+    Dimension,
+    Radians,
+    Degrees,
+    Intersection,
+};
 
 mod time;
 pub use common::time::ScopeTimer;
+
+#[macro_export]
+macro_rules! hashmap {
+    ($($k:expr => $v:expr),*) => {
+       {
+           let mut map = std::collections::HashMap::new();
+           $(map.insert($k, $v);)*
+           map
+       }
+    }
+}