public int CompareTo(Vector other) { var retval = Horizontal.CompareTo(other.Horizontal); if (retval == 0) { return(Vertical.CompareTo(other.Vertical)); } return(retval); }