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 88ea45132fcb5ae1c5448ceb3e1e7364b21dfef6..eb5e9583a3ef92c4c8e02a0fc30b2bd739d625b9 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;