minor tidying

This commit is contained in:
Chris Forbes
2009-10-22 23:33:51 +13:00
parent b73e5a62bb
commit 8249951b27
2 changed files with 16 additions and 29 deletions

View File

@@ -23,7 +23,8 @@ namespace OpenRa
public int2 Sign() { return new int2(Math.Sign(X), Math.Sign(Y)); }
public int2 Abs() { return new int2( Math.Abs( X ), Math.Abs( Y ) ); }
public int Length { get { return (int)Math.Sqrt(X * X + Y * Y); } }
public int LengthSquared { get { return X * X + Y * Y; } }
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public override bool Equals(object obj)