Remove CPos.Max/Min.
This commit is contained in:
@@ -33,9 +33,6 @@ namespace OpenRA
|
||||
public static bool operator ==(CPos me, CPos other) { return me.X == other.X && me.Y == other.Y; }
|
||||
public static bool operator !=(CPos me, CPos other) { return !(me == other); }
|
||||
|
||||
public static CPos Max(CPos a, CPos b) { return new CPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static CPos Min(CPos a, CPos b) { return new CPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public bool Equals(CPos other) { return X == other.X && Y == other.Y; }
|
||||
|
||||
@@ -100,8 +100,8 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
static IEnumerable<CPos> GetMinefieldCells(CPos start, CPos end, WDist depth)
|
||||
{
|
||||
var mins = CPos.Min(start, end);
|
||||
var maxs = CPos.Max(start, end);
|
||||
var mins = new CPos(Math.Min(start.X, end.X), Math.Min(start.Y, end.Y));
|
||||
var maxs = new CPos(Math.Max(start.X, end.X), Math.Max(start.Y, end.Y));
|
||||
|
||||
/* TODO: proper endcaps, if anyone cares (which won't happen unless depth is large) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user