misc.h

changeset 146
2ab24976acaa
parent 138
d22d5c1d9e8a
child 147
291a1fe2d278
--- a/misc.h	Sat Apr 27 16:22:35 2013 +0300
+++ b/misc.h	Sun Apr 28 04:04:36 2013 +0300
@@ -43,6 +43,14 @@
 	floatconfig* const confs[4];
 } gridinfo;
 
+extern_cfg (int, grid);
+static const short g_NumGrids = 3;
+extern const gridinfo g_GridInfo[3];
+
+inline const gridinfo& currentGrid () {
+	return g_GridInfo[grid];
+}
+
 namespace Grid {
 	enum Type {
 		Coarse,
@@ -56,16 +64,10 @@
 		Z,
 		Angle
 	};
+	
+	double snap (double value, const Grid::Config axis);
 };
 
-extern_cfg (int, grid);
-static const short g_NumGrids = 3;
-extern const gridinfo g_GridInfo[3];
-
-inline const gridinfo& currentGrid () {
-	return g_GridInfo[grid];
-}
-
 template<class T> void dataswap (T& a, T& b) {
 	T c = a;
 	a = b;

mercurial