MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / Combine

Method Combine

CSharp/Clipper2Lib/HashCode.cs:71–84  ·  view source on GitHub ↗
(T1 value1, T2 value2)

Source from the content-addressed store, hash-verified

69 }
70
71 public static int Combine<T1, T2>(T1 value1, T2 value2)
72 {
73 uint hc1 = (uint) (value1?.GetHashCode() ?? 0);
74 uint hc2 = (uint) (value2?.GetHashCode() ?? 0);
75
76 uint hash = MixEmptyState();
77 hash += 8;
78
79 hash = QueueRound(hash, hc1);
80 hash = QueueRound(hash, hc2);
81
82 hash = MixFinal(hash);
83 return (int) hash;
84 }
85
86 [MethodImpl(MethodImplOptions.AggressiveInlining)]
87 private static uint QueueRound(uint hash, uint queuedValue)

Callers 2

GetHashCodeMethod · 0.80
GetHashCodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected