I'm trying to program a boolean method that compares two doubles of an Object and if they are within 0.00001 of each other they are equal
public boolean equals ( 2D that ) { if ( ((Math.abs(x-that.x) >= 0.00001) || (Math.abs(x-that.x) <= 0.00001)) && ((Math.abs(y-that.y) >= 0.00001) || (Math.abs(y-that.y) <= 0.00001))) return true; else return false; }