--- /dev/null
+#ifndef MATH_UTILITY_H_
+#define MATH_UTILITY_H_
+
+
+namespace math {
+
+template<class Int>
+Int DistanceShift(Int what, int lhs, int rhs) {
+ if (lhs < rhs) {
+ return what >> (rhs - lhs);
+ } else {
+ return what << (lhs - rhs);
+ }
+}
+
+}
+
+#endif