chiark / gitweb /
comments etc. fixed up for new topology
[moebius2.git] / bgl.cpp
diff --git a/bgl.cpp b/bgl.cpp
index 28c6ee6fe45816724bf5148d931f40ea3a40ef70..325617eca59b114fff476833f347eeb3cc718e90 100644 (file)
--- a/bgl.cpp
+++ b/bgl.cpp
@@ -98,8 +98,8 @@ class OutEdgeIterator :
   }
 
   static int voe_min(int _v) { return (_v & YMASK) ? 2 : 3; }
-  static int voe_max(int _v) { return (~_v & YMASK) ? V6 : 4; }
-  static int voe_degree(int _v) { return (_v & YMASK | ~_v & YMASK) ? 4 : V6; }
+  static int voe_max(int _v) { return (_v & YMASK)==(Y-1) ? V6 : 4; }
+  static int voe_degree(int _v) { return RIM_VERTEX_P(_v) ? 4 : V6; }
 };
  
 typedef counting_iterator<int> VertexIterator;