コード例 #1
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = P1.GetHashCode();
         result = (result * 397) ^ P2.GetHashCode();
         result = (result * 397) ^ P3.GetHashCode();
         result = (result * 397) ^ P4.GetHashCode();
         return(result);
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: jarosm/AdventOfCode2019
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + P1.GetHashCode();
         hash = hash * 23 + P2.GetHashCode();
         hash = hash * 23 + P3.GetHashCode();
         hash = hash * 23 + P4.GetHashCode();
         return(hash);
     }
 }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = _f1;
         result = (result * 397) ^ (F2 != null ? F2.GetHashCode() : 0);
         result = (result * 397) ^ (P0 != null ? P0.GetHashCode() : 0);
         result = (result * 397) ^ (P2 != null ? P2.GetHashCode() : 0);
         result = (result * 397) ^ (P3 != null ? P3.GetHashCode() : 0);
         result = (result * 397) ^ (P4 != null ? P4.GetHashCode() : 0);
         result = (result * 397) ^ (P5 != null ? P5.GetHashCode() : 0);
         return(result);
     }
 }
コード例 #4
0
        public override int GetHashCode()
        {
            var hashCode = 2018318558;

            hashCode = hashCode * -1521134295 + T1.GetHashCode();
            hashCode = hashCode * -1521134295 + T2.GetHashCode();
            hashCode = hashCode * -1521134295 + T3.GetHashCode();
            hashCode = hashCode * -1521134295 + T4.GetHashCode();
            hashCode = hashCode * -1521134295 + T5.GetHashCode();
            hashCode = hashCode * -1521134295 + P1.GetHashCode();
            hashCode = hashCode * -1521134295 + P2.GetHashCode();
            hashCode = hashCode * -1521134295 + P3.GetHashCode();
            hashCode = hashCode * -1521134295 + P4.GetHashCode();
            hashCode = hashCode * -1521134295 + P5.GetHashCode();
            hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode();
            return(hashCode);
        }
コード例 #5
0
        public override int GetHashCode()
        {
            var hashCode = -1044093539;

            hashCode = hashCode * -1521134295 + T1.GetHashCode();
            hashCode = hashCode * -1521134295 + T2.GetHashCode();
            hashCode = hashCode * -1521134295 + T3.GetHashCode();
            hashCode = hashCode * -1521134295 + T4.GetHashCode();
            hashCode = hashCode * -1521134295 + T5.GetHashCode();
            hashCode = hashCode * -1521134295 + P1.GetHashCode();
            hashCode = hashCode * -1521134295 + P2.GetHashCode();
            hashCode = hashCode * -1521134295 + P3.GetHashCode();
            hashCode = hashCode * -1521134295 + P4.GetHashCode();
            hashCode = hashCode * -1521134295 + P5.GetHashCode();
            hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + Length.GetHashCode();
            hashCode = hashCode * -1521134295 + Lock.GetHashCode();
            return(hashCode);
        }
コード例 #6
0
        public override int GetHashCode()
        {
            int hashCode = -2063967696;

            hashCode = hashCode * -1521134295 + Transform.GetHashCode();
            hashCode = hashCode * -1521134295 + Material.GetHashCode();
            hashCode = hashCode * -1521134295 + SavedRay.GetHashCode();
            hashCode = hashCode * -1521134295 + Parent.GetHashCode();
            hashCode = hashCode * -1521134295 + HasParent.GetHashCode();
            hashCode = hashCode * -1521134295 + P1.GetHashCode();
            hashCode = hashCode * -1521134295 + P2.GetHashCode();
            hashCode = hashCode * -1521134295 + P3.GetHashCode();
            hashCode = hashCode * -1521134295 + Edge1.GetHashCode();
            hashCode = hashCode * -1521134295 + Edge2.GetHashCode();
            hashCode = hashCode * -1521134295 + Normal.GetHashCode();
            hashCode = hashCode * -1521134295 + N1.GetHashCode();
            hashCode = hashCode * -1521134295 + N2.GetHashCode();
            hashCode = hashCode * -1521134295 + N3.GetHashCode();
            hashCode = hashCode * -1521134295 + IsSmoothed.GetHashCode();
            return(hashCode);
        }
コード例 #7
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     return(P1.GetHashCode() ^ 1 + P2.GetHashCode() ^ 2 + P3.GetHashCode());
 }
コード例 #8
0
 public override int GetHashCode() =>
 P1.GetHashCode() ^ P2.GetHashCode() ^ P3.GetHashCode() ^ P4.GetHashCode();