public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hash = 17; hash = hash * 23 + W.GetHashCode(); hash = hash * 23 + V.GetHashCode(); return(hash); } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { // Overflow is fine, just wrap unchecked { int hash = 17; hash = hash * 29 + Minimum.GetHashCode(); hash = hash * 29 + Maximum.GetHashCode(); return(hash); } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { // Overflow is fine, just wrap unchecked { int hash = 17; hash = hash * 29 + Center.GetHashCode(); hash = hash * 29 + Radius.GetHashCode(); return(hash); } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { // Overflow is fine, just wrap unchecked { int hash = 17; hash = hash * 29 + Position.GetHashCode(); hash = hash * 29 + Direction.GetHashCode(); return(hash); } }