18 lines
556 B
C#
18 lines
556 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
namespace System.Numerics
|
|
{
|
|
internal static class HashCodeHelper
|
|
{
|
|
/// <summary>
|
|
/// Combines two hash codes, useful for combining hash codes of individual vector elements
|
|
/// </summary>
|
|
internal static int CombineHashCodes(int h1, int h2)
|
|
{
|
|
return (((h1 << 5) + h1) ^ h2);
|
|
}
|
|
}
|
|
}
|