Algorithmix.Enumeration.Combination C# (CSharp) Method

Combination() public static method

Combines two Matches to give you an Aggregate If Both are Inverted or Noninverted it will return NonInverted; If Both are different it will return Inverted; If Either are Impossible it will return Impossible;
public static Combination ( Match firstFit, Match secondFit ) : Match
firstFit Match The first Match Type
secondFit Match The Second Match Type
return Match
        public static Match Combination(Match firstFit, Match secondFit)
        {
            if ((firstFit == Match.Inverted && secondFit == Match.NonInverted) ||
                (firstFit == Match.NonInverted && secondFit == Match.Inverted))
            {
                return Match.Inverted;
            }
            if ((firstFit == Match.Inverted && secondFit == Match.Inverted) ||
                (firstFit == Match.NonInverted && secondFit == Match.NonInverted))
            {
                return Match.NonInverted;
            }
            return Match.Impossible;
        }