/// <summary> /// Returns the HashCode for this Matrix3D /// </summary> /// <returns> /// int - the HashCode for this Matrix3D /// </returns> public override int GetHashCode() { if (IsDistinguishedIdentity) { return(c_identityHashCode); } else { // Perform field-by-field XOR of HashCodes return(M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M14.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M24.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode() ^ M34.GetHashCode() ^ OffsetX.GetHashCode() ^ OffsetY.GetHashCode() ^ OffsetZ.GetHashCode() ^ M44.GetHashCode()); } }
/// <summary> /// Get the hashcode for this <see cref="Matrix3D"/> instance. /// </summary> /// <returns>Returns the hash code for this <see cref="Matrix3D"/> instance.</returns> public override int GetHashCode() { return (M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode()); }
public override int GetHashCode() { return(M00.GetHashCode() ^ M01.GetHashCode() ^ M02.GetHashCode() ^ M03.GetHashCode() ^ M10.GetHashCode() ^ M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M20.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M30.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode()); }
public override int GetHashCode() { unchecked { var hashCode = M11.GetHashCode(); hashCode = (hashCode * 397) ^ M12.GetHashCode(); hashCode = (hashCode * 397) ^ M13.GetHashCode(); hashCode = (hashCode * 397) ^ M14.GetHashCode(); hashCode = (hashCode * 397) ^ M21.GetHashCode(); hashCode = (hashCode * 397) ^ M22.GetHashCode(); hashCode = (hashCode * 397) ^ M23.GetHashCode(); hashCode = (hashCode * 397) ^ M24.GetHashCode(); hashCode = (hashCode * 397) ^ M31.GetHashCode(); hashCode = (hashCode * 397) ^ M32.GetHashCode(); hashCode = (hashCode * 397) ^ M33.GetHashCode(); hashCode = (hashCode * 397) ^ M34.GetHashCode(); hashCode = (hashCode * 397) ^ M41.GetHashCode(); hashCode = (hashCode * 397) ^ M42.GetHashCode(); hashCode = (hashCode * 397) ^ M43.GetHashCode(); hashCode = (hashCode * 397) ^ M44.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { // Overflow is fine, just wrap unchecked { int hash = 17; hash = hash * 29 + M00.GetHashCode(); hash = hash * 29 + M01.GetHashCode(); hash = hash * 29 + M02.GetHashCode(); hash = hash * 29 + M03.GetHashCode(); hash = hash * 29 + M10.GetHashCode(); hash = hash * 29 + M11.GetHashCode(); hash = hash * 29 + M12.GetHashCode(); hash = hash * 29 + M13.GetHashCode(); hash = hash * 29 + M20.GetHashCode(); hash = hash * 29 + M21.GetHashCode(); hash = hash * 29 + M22.GetHashCode(); hash = hash * 29 + M23.GetHashCode(); return(hash); } }
public override int GetHashCode() { return (M11.GetHashCode() + M12.GetHashCode() + M13.GetHashCode() + M14.GetHashCode() + M21.GetHashCode() + M22.GetHashCode() + M23.GetHashCode() + M24.GetHashCode() + M31.GetHashCode() + M32.GetHashCode() + M33.GetHashCode() + M34.GetHashCode() + M41.GetHashCode() + M42.GetHashCode() + M43.GetHashCode() + M44.GetHashCode()); }
/// <summary> /// Gets the hash code for a given Matrix4. /// </summary> /// <returns>The calculated hash code.</returns> public override int GetHashCode() { // Note this method of hash code generation is similar to what the XNA framework does return(M11.GetHashCode() + M12.GetHashCode() + M13.GetHashCode() + M14.GetHashCode() + M21.GetHashCode() + M22.GetHashCode() + M23.GetHashCode() + M24.GetHashCode() + M31.GetHashCode() + M32.GetHashCode() + M33.GetHashCode() + M34.GetHashCode() + M41.GetHashCode() + M42.GetHashCode() + M43.GetHashCode() + M44.GetHashCode()); }
/// <summary> /// Serves as a hash function for a particular type. <see cref="M:System.Object.GetHashCode"></see> is suitable for use in hashing algorithms and data structures like a hash table</summary> /// <returns>A hash code for the current <see cref="T:System.Object"></see></returns> public override int GetHashCode() { long bits = 1; bits = 31 * bits + M11.GetHashCode(); bits = 31 * bits + M12.GetHashCode(); bits = 31 * bits + M13.GetHashCode(); bits = 31 * bits + M21.GetHashCode(); bits = 31 * bits + M22.GetHashCode(); bits = 31 * bits + M23.GetHashCode(); bits = 31 * bits + M31.GetHashCode(); bits = 31 * bits + M32.GetHashCode(); bits = 31 * bits + M33.GetHashCode(); return((int)(bits ^ (bits >> 32))); }
public override int GetHashCode() { unchecked { int hashCode = M11.GetHashCode(); hashCode = (hashCode * 397) ^ M12.GetHashCode(); hashCode = (hashCode * 397) ^ M13.GetHashCode(); hashCode = (hashCode * 397) ^ M21.GetHashCode(); hashCode = (hashCode * 397) ^ M22.GetHashCode(); hashCode = (hashCode * 397) ^ M23.GetHashCode(); hashCode = (hashCode * 397) ^ M31.GetHashCode(); hashCode = (hashCode * 397) ^ M32.GetHashCode(); hashCode = (hashCode * 397) ^ M33.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { // Perform field-by-field XOR of HashCodes return(M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M14.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M24.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode() ^ M34.GetHashCode() ^ OffsetX.GetHashCode() ^ OffsetY.GetHashCode() ^ OffsetZ.GetHashCode() ^ M44.GetHashCode()); }
/// <inheritdoc/> public override Int32 GetHashCode() { unchecked { var hash = 17; hash = hash * 23 + M11.GetHashCode(); hash = hash * 23 + M12.GetHashCode(); hash = hash * 23 + M13.GetHashCode(); hash = hash * 23 + M14.GetHashCode(); hash = hash * 23 + M21.GetHashCode(); hash = hash * 23 + M22.GetHashCode(); hash = hash * 23 + M23.GetHashCode(); hash = hash * 23 + M24.GetHashCode(); hash = hash * 23 + M31.GetHashCode(); hash = hash * 23 + M32.GetHashCode(); hash = hash * 23 + M33.GetHashCode(); hash = hash * 23 + M34.GetHashCode(); hash = hash * 23 + M41.GetHashCode(); hash = hash * 23 + M42.GetHashCode(); hash = hash * 23 + M43.GetHashCode(); hash = hash * 23 + M44.GetHashCode(); return(hash); } }
public override int GetHashCode() => M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M14.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M24.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode() ^ M34.GetHashCode() ^ M41.GetHashCode() ^ M42.GetHashCode() ^ M43.GetHashCode() ^ M44.GetHashCode();
public override int GetHashCode() => M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode();
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>The hash code.</returns> public override int GetHashCode() { return(unchecked (M11.GetHashCode() + M12.GetHashCode() + M13.GetHashCode() + M21.GetHashCode() + M22.GetHashCode() + M23.GetHashCode() + M31.GetHashCode() + M32.GetHashCode() + M33.GetHashCode())); }