diff --git a/Quik/QuikGeometry.cs b/Quik/QuikGeometry.cs index f781fec..2aa3d7f 100644 --- a/Quik/QuikGeometry.cs +++ b/Quik/QuikGeometry.cs @@ -321,6 +321,14 @@ namespace Quik Min += offset; Max += offset; } + + public static QuikRectangle Intersect(in QuikRectangle a, in QuikRectangle b) => + new QuikRectangle( + Math.Min(a.Right, b.Right), + Math.Min(a.Top, b.Top), + Math.Max(a.Left, b.Left), + Math.Max(a.Bottom, b.Bottom) + ); } ///