public override bool Equals(object o) { if (this.GetType() != o.GetType()) { return(false); } else { VectorInt2 v = (VectorInt2)o; return(this.x == v.x && this.y == v.y); } }
public static int Manhattan(VectorInt2 v1, VectorInt2 v2) { return(Mathf.Abs(v1.x - v2.x) + Mathf.Abs(v1.y - v2.y)); }