private static projectionIntersection ( int a, int b, int c, int d, IntersectionCheckOptions option ) : bool | ||
a | int | |
b | int | |
c | int | |
d | int | |
option | IntersectionCheckOptions | |
Результат | bool |
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);
}