chiark / gitweb /
WIP routesearch; add no. of ports to divisor for per-league
[ypp-sc-tools.main.git] / 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;