chiark / gitweb /
get rim twist right
authorIan Jackson <ian@davenant.greenend.org.uk>
Tue, 21 Oct 2008 00:00:19 +0000 (01:00 +0100)
committerIan Jackson <ian@davenant.greenend.org.uk>
Tue, 21 Oct 2008 00:00:19 +0000 (01:00 +0100)
energy.c

index 2f8a854..aa2dd47 100644 (file)
--- a/energy.c
+++ b/energy.c
@@ -516,7 +516,7 @@ void compute_rim_twist_angles(const Vertices vertices, int section) {
     /* we are interested in the angle subtended at the rim, from the
      * rim's point of view. */
     K distance[k]= vertices[v][k] - oncircle[k];
-    double distance_positive_z= distance[3];
+    double distance_positive_z= distance[2];
     double distance_radial_outwards= dotprod(distance, oncircle);
     rim_vertex_angles[v]= atan2(distance_positive_z, distance_radial_outwards);
   }