private static bool projectionIntersection(int a, int b, int c, int d, IntersectionCheckOptions option) { if (a > b){ HelperUtils.Swap(ref a, ref b); } if (c > d){ HelperUtils.Swap(ref c, ref d); } return option == IntersectionCheckOptions.WithoutEdgePoints ? Math.Max(a, c) < Math.Min(b, d) : Math.Max(a, c) <= Math.Min(b, d); }