Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1. public bool CheckIntersect1(double a, double b, double c, double d)
  2.         {
  3.             if (a > b)
  4.                 Swap(ref a, ref b);
  5.             if (c > d)
  6.                 Swap(ref c, ref d);
  7.             return Math.Max(a, c) <= Math.Min(b, d);
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement