chiark / gitweb /
WIP routesearch; add no. of ports to divisor for per-league
authorIan Jackson <ian@liberator.(none)>
Sat, 3 Oct 2009 09:22:23 +0000 (10:22 +0100)
committerIan Jackson <ian@liberator.(none)>
Sat, 3 Oct 2009 09:22:23 +0000 (10:22 +0100)
yarrg/rssearch.c

index 88ea451..eb5e958 100644 (file)
@@ -36,7 +36,7 @@ static double best_absolute, best_perleague;
 
 static void process_route(int nports, int totaldist) {
   double absolute= value_route(nports, ports);
-  double perleague= absolute / totaldist;
+  double perleague= absolute / (totaldist + nports);
 
   if (absolute < best_absolute && perleague < best_perleague) return;