From: Ian Jackson Date: Sat, 3 Oct 2009 09:22:23 +0000 (+0100) Subject: WIP routesearch; add no. of ports to divisor for per-league X-Git-Tag: 5.0^2~84 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=commitdiff_plain;h=051cadee0203526bac95936a28d8fa35901cc925 WIP routesearch; add no. of ports to divisor for per-league --- diff --git a/yarrg/rssearch.c b/yarrg/rssearch.c index 88ea451..eb5e958 100644 --- a/yarrg/rssearch.c +++ b/yarrg/rssearch.c @@ -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;