Example #1
0
        internal static BiaNodeSlotDir NodeSlotDir(BiaNodeSlotDir target, bool isTrue)
        {
            if (isTrue)
            {
                return(target);
            }

            switch (target)
            {
            case BiaNodeSlotDir.Left:
                return(BiaNodeSlotDir.Top);

            case BiaNodeSlotDir.Top:
                return(BiaNodeSlotDir.Left);

            case BiaNodeSlotDir.Right:
                return(BiaNodeSlotDir.Bottom);

            case BiaNodeSlotDir.Bottom:
                return(BiaNodeSlotDir.Right);

            default:
                throw new ArgumentOutOfRangeException(nameof(target), target, null);
            }
        }
Example #2
0
 public static bool IsHorizontal(this BiaNodeSlotDir self) =>
 self == BiaNodeSlotDir.Left ||
 self == BiaNodeSlotDir.Right;
Example #3
0
 public static bool IsVertical(this BiaNodeSlotDir self) =>
 self == BiaNodeSlotDir.Top ||
 self == BiaNodeSlotDir.Bottom;