CapRaffle.Domain.Raffle.DrawWinners.CalculateNumberOfSpotsToGive C# (CSharp) Метод

CalculateNumberOfSpotsToGive() приватный Метод

private CalculateNumberOfSpotsToGive ( int spotsLeft, int wantedSpots ) : int
spotsLeft int
wantedSpots int
Результат int
        private int CalculateNumberOfSpotsToGive(int spotsLeft, int wantedSpots)
        {
            int spotsToGive = 0;
            if (wantedSpots > spotsLeft) spotsToGive = spotsLeft;
            if (wantedSpots <= spotsLeft) spotsToGive = wantedSpots;
            return spotsToGive;
        }