Skip to content

Commit

Permalink
RectInt.At
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyThorson committed Sep 28, 2024
1 parent a1d970b commit ab89f42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Framework/Spatial/RectInt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ public readonly bool Overlaps(in RectInt against)
public readonly bool Overlaps(in Rect against)
=> X + Width > against.X && Y + Height > against.Y && X < against.X + against.Width && Y < against.Y + against.Height;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly RectInt At(in Point2 pos)
=> new(pos.X, pos.Y, Width, Height);

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly RectInt Conflate(in RectInt other)
{
Expand Down

0 comments on commit ab89f42

Please sign in to comment.