public static RectangleF Intersect(RectangleF a, RectangleF b)
{
float num = Math.Max(a.X, b.X);
float num2 = Math.Min(a.X + a.Width, b.X + b.Width);
float num3 = Math.Max(a.Y, b.Y);
float num4 = Math.Min(a.Y + a.Height, b.Y + b.Height);
if (num2 >= num && num4 >= num3)
{
return new RectangleF(num, num3, num2 - num, num4 - num3);
}
return RectangleF.Empty;
}