TheAirline.Models.Airports.Terminals.GetFreeSlotsPercent C# (CSharp) Method

GetFreeSlotsPercent() public method

public GetFreeSlotsPercent ( Airline airline, Terminal type ) : double
airline TheAirline.Models.Airlines.Airline
type Terminal
return double
        public double GetFreeSlotsPercent(Airline airline, Terminal.TerminalType type)
        {
            const double numberOfSlots = (22 - 6)*4*7; //from 06.00 to 22.00 each quarter each day (7 days a week)

            double usedSlots = AirportHelpers.GetOccupiedSlotTimes(Airport, airline, Weather.Season.AllYear, type).Count;

            double percent = ((numberOfSlots - usedSlots)/numberOfSlots)*100;

            return percent;
        }