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); } }
public static bool IsHorizontal(this BiaNodeSlotDir self) => self == BiaNodeSlotDir.Left || self == BiaNodeSlotDir.Right;
public static bool IsVertical(this BiaNodeSlotDir self) => self == BiaNodeSlotDir.Top || self == BiaNodeSlotDir.Bottom;