chiark / gitweb /
fix up bgl.cpp for topology
[moebius2.git] / energy.c
index ce78a54ebed9fc43c27dda82a6a27f0327463f40..d673c14ea2820fd7e8e59b45678f486a842572a0 100644 (file)
--- a/energy.c
+++ b/energy.c
@@ -18,8 +18,8 @@ static double noncircular_rim_cost(const Vertices vertices);
 static void compute_vertex_areas(const Vertices vertices, double areas[N]);
 static double best_energy= DBL_MAX;
 
-static void cost(double *energy, double tweight, double tcost);
-#define COST(weight, compute) cost(&energy, (weight), (compute))
+static void addcost(double *energy, double tweight, double tcost);
+#define COST(weight, compute) addcost(&energy, (weight), (compute))
 
 /*---------- main energy computation and subroutines ----------*/
 
@@ -54,7 +54,7 @@ static double compute_energy(const Vertices vertices) {
   return energy;
 }    
 
-static void cost(double *energy, double tweight, double tcost) {
+static void addcost(double *energy, double tweight, double tcost) {
   double tenergy= tweight * tcost;
   printf(" %# e > %# e |", tcost, tenergy);
   *energy += tenergy;