CapRaffle.Domain.Raffle.DrawWinners.CalculateNumberOfSpotsToGive C# (CSharp) Method

CalculateNumberOfSpotsToGive() private method

private CalculateNumberOfSpotsToGive ( int spotsLeft, int wantedSpots ) : int
spotsLeft int
wantedSpots int
return int
        private int CalculateNumberOfSpotsToGive(int spotsLeft, int wantedSpots)
        {
            int spotsToGive = 0;
            if (wantedSpots > spotsLeft) spotsToGive = spotsLeft;
            if (wantedSpots <= spotsLeft) spotsToGive = wantedSpots;
            return spotsToGive;
        }