public void Intersect(Rect rect)
{
if (!this.IntersectsWith(rect))
{
this = Empty;
}
else
{
double num2 = Math.Max(this.Left, rect.Left);
double num = Math.Max(this.Top, rect.Top);
this._width = Math.Max((double)(Math.Min(this.Right, rect.Right) - num2), (double)0.0);
this._height = Math.Max((double)(Math.Min(this.Bottom, rect.Bottom) - num), (double)0.0);
this._x = num2;
this._y = num;
}
}