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;
        }