Exemple #1
0
 /**
  * Used to check if this is equal to other. This and other are equal if and only if other is an
  * instance of DTriangle and their points are the same (whatever their order in the triangle).
  *
  * @param other
  * @return true if this and other are equal
  */
 @Override
 public final boolean equals(Object other) {
   if (other instanceof DTriangle) {
     DTriangle otherTri = (DTriangle) other;
     boolean ret =
         belongsTo(otherTri.getPoint(0))
             && belongsTo(otherTri.getPoint(1))
             && belongsTo(otherTri.getPoint(2));
     return ret;
   } else {
     return false;
   }
 }