示例#1
0
 /**
  * test equality
  *
  * @param x
  * @param y
  * @param error tolerance
  * @return
  */
 public static boolean equals(ComplexXmlType x, ComplexXmlType y, double err) {
   return (x == null && y == null)
       || x != null
           && y != null
           && Math.abs(x.getRe() - y.getRe()) < err
           && Math.abs(x.getIm() - y.getIm()) < err;
 }
示例#2
0
 /**
  * test equality
  *
  * @param x
  * @param y
  * @return
  */
 public static boolean equals(ComplexXmlType x, ComplexXmlType y) {
   return (x == null && y == null)
       || x != null
           && y != null
           && Math.abs(x.getRe() - y.getRe()) < ERR
           && Math.abs(x.getIm() - y.getIm()) < ERR;
 }