fix: Cleans up the GetXDistance methods. (#2279)
This commit is contained in:
parent
f2ce860c18
commit
06443ba0ca
3 changed files with 5 additions and 9 deletions
|
|
@ -50,11 +50,7 @@ public partial class Map
|
|||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ClientDistanceEnumerable GetClientsInBoundsByDistance(Rectangle2D bounds) =>
|
||||
GetClientsInBoundsByDistance(bounds, new Point2D(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2));
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ClientDistanceEnumerable GetClientsInBoundsByDistance(Rectangle2D bounds, bool makeBoundsInclusive) =>
|
||||
public ClientDistanceEnumerable GetClientsInBoundsByDistance(Rectangle2D bounds, bool makeBoundsInclusive = false) =>
|
||||
GetClientsInBoundsByDistance(bounds, new Point2D(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2), makeBoundsInclusive);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ public partial class Map
|
|||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ItemDistanceEnumerable<Item> GetItemsInBoundsByDistance(Rectangle2D bounds) =>
|
||||
GetItemsInBoundsByDistance<Item>(bounds);
|
||||
public ItemDistanceEnumerable<Item> GetItemsInBoundsByDistance(Rectangle2D bounds, bool makeBoundsInclusive = false) =>
|
||||
GetItemsInBoundsByDistance<Item>(bounds, makeBoundsInclusive);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ItemDistanceEnumerable<T> GetItemsInBoundsByDistance<T>(Rectangle2D bounds, bool makeBoundsInclusive = false)
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ public partial class Map
|
|||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public MobileDistanceEnumerable<Mobile> GetMobilesInBoundsByDistance(Rectangle2D bounds) =>
|
||||
GetMobilesInBoundsByDistance<Mobile>(bounds);
|
||||
public MobileDistanceEnumerable<Mobile> GetMobilesInBoundsByDistance(Rectangle2D bounds, bool makeBoundsInclusive = false) =>
|
||||
GetMobilesInBoundsByDistance<Mobile>(bounds, makeBoundsInclusive);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public MobileDistanceEnumerable<T> GetMobilesInBoundsByDistance<T>(Rectangle2D bounds, bool makeBoundsInclusive = false) where T : Mobile =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue