示例#1
0
        public override int GetHashCode()
        {
            int hash = Exponent;

            hash ^= Matrix.GetHashCode() << 3;

            return(hash);
        }
示例#2
0
        public void HashCodeGenerationWorksCorrectly()
        {
            HashSet <int> hashCodes = new HashSet <int>();
            Matrix2x3     value     = new Matrix2x3(1);

            for (int i = 2; i <= 100; i++)
            {
                Assert.True(hashCodes.Add(value.GetHashCode()), "Unique hash code generation failure.");

                value *= i;
            }
        }
示例#3
0
        public void HashCodeGenerationWorksCorrectly()
        {
            HashSet<int> hashCodes = new HashSet<int>();
            Matrix2x3 value = new Matrix2x3(1);

            for (int i = 2; i <= 100; i++)
            {
                Assert.True(hashCodes.Add(value.GetHashCode()), "Unique hash code generation failure.");

                value *= i;
            }
        }