Exemple #1
0
        public bool Equals(Triangle other, double precision = 1e-3)
        {
            var areEqual = ShortSide.EqualSegmentExistInList(other.sides, precision) &&
                           MiddleSide.EqualSegmentExistInList(other.sides, precision) &&
                           LargeSide.EqualSegmentExistInList(other.sides, precision);

            return(areEqual);
        }
Exemple #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = ShortSide.GetHashCode();
         hashCode = (hashCode * 397) ^ MiddleSide.GetHashCode();
         hashCode = (hashCode * 397) ^ LargeSide.GetHashCode();
         return(hashCode);
     }
 }