Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(OrderedVertices?.Aggregate(0, (i, v) => i * 367 ^ ((int)v.X * 419) ^ ((int)v.Y * 293) ^ ((int)v.Z * 137)) ?? 0);
     }
 }
Beispiel #2
0
        public bool Equals(Cube other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            var sequenceEqual = OrderedVertices.SequenceEqual(other.OrderedVertices, VectorIntEqualityComparer.Instance);

            return(sequenceEqual);
        }