Exemple #1
0
        public static AABBSide GetOppositeSide(AABBSide side)
        {
            switch (side)
            {
            case AABBSide.enTop:
                return(AABBSide.enBottom);

            case AABBSide.enBottom:
                return(AABBSide.enTop);

            case AABBSide.enLeft:
                return(AABBSide.enRight);

            case AABBSide.enRight:
                return(AABBSide.enLeft);
            }
            //Should never get here.
            throw new Exception("Side does not have an opposite!");
        }
Exemple #2
0
 public static AABBSide GetOppositeSide(AABBSide side)
 {
     switch (side)
     {
         case AABBSide.enTop:
             return AABBSide.enBottom;
         case AABBSide.enBottom:
             return AABBSide.enTop;
         case AABBSide.enLeft:
             return AABBSide.enRight;
         case AABBSide.enRight:
             return AABBSide.enLeft;
     }
     //Should never get here.
     throw new Exception("Side does not have an opposite!");
 }