예제 #1
0
/**
 * Calculates the maintenance cost of a number of signals.
 * @param num Number of signals.
 * @return Total cost.
 */
        public static Money SignalMaintenanceCost(uint num)
        {
            return((_price[PR_INFRASTRUCTURE_RAIL] * 15 * num * (1 + MathFuncs.IntSqrt(num))) >>
                   8);    // 1 bit fraction for the multiplier and 7 bits scaling.
        }