Пример #1
0
        public override int GetHashCode()
        {
            int result = 17;

            result = 31 * result + XX.GetHashCode();
            result = 31 * result + XY.GetHashCode();
            result = 31 * result + XZ.GetHashCode();

            result = 31 * result + YX.GetHashCode();
            result = 31 * result + YY.GetHashCode();
            result = 31 * result + YZ.GetHashCode();

            result = 31 * result + ZX.GetHashCode();
            result = 31 * result + ZY.GetHashCode();
            result = 31 * result + ZZ.GetHashCode();
            return(result);
        }
Пример #2
0
        public override int GetHashCode()
        {
            int h = 17;

            unchecked
            {
                h = h * 23 + XX.GetHashCode();
                h = h * 23 + XY.GetHashCode();
                h = h * 23 + XZ.GetHashCode();
                h = h * 23 + YX.GetHashCode();
                h = h * 23 + YY.GetHashCode();
                h = h * 23 + YZ.GetHashCode();
                h = h * 23 + ZX.GetHashCode();
                h = h * 23 + ZY.GetHashCode();
                h = h * 23 + ZZ.GetHashCode();
            }
            return(h);
        }