Add intersect to rectangle.
This commit is contained in:
parent
9339295378
commit
fc1cc6a1ba
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user