GA/Assets/Scripts/World.cs
/// <summary>
/// Displays relative distance difference of the current best route 
/// to the starting route (can be toggled).
/// </summary>
Displays relative distance difference of the current best route
to the starting route (can be toggled).
Displays relative distance difference of the current best route to the starting route ( can be toggled ) .
public void ShowChange() {
        var distB = System.Math.Truncate(allTimeBest.GetDistance() * 1000) / 1000;
        if (toggled) {
            var change = (allTimeBest.GetDistance() - startDist) / startDist * 100f;
            bestDist.text = "Distance: " + distB + "   (" + System.Math.Truncate(change * 100f) / 100f + "%)";
        } else {
            bestDist.text = "Distance: " + distB;
        }
    }
public void ShowChange ( ) { var distB = System . Math . Truncate ( allTimeBest . GetDistance ( ) * 1000 ) / 1000 ; if ( toggled ) { var change = ( allTimeBest . GetDistance ( ) - startDist ) / startDist * 100f ; bestDist . text = " " + distB + " " + System . Math . Truncate ( change * 100f ) / 100f + " " ; } else { bestDist . text = " " + distB ; } }
Displays relative distance difference of the current best route
to the starting route (can be toggled).
Displays relative distance difference of the current best route to the starting route ( can be toggled ) .