public boolean isNearlyEqualTo(DoubleVector v,double tolerance){
  return Math.abs(v.x - x) < tolerance && Math.abs(v.y - y) < tolerance && Math.abs(v.z - z) < tolerance;
}

public boolean isNearlyEqualTo ( DoubleVector v , double tolerance ) { return Math . abs ( v . x - x ) < tolerance && Math . abs ( v . y - y ) < tolerance && Math . abs ( v . z - z ) < tolerance ; }
checks if this vector is nearly equals to the vector v , with some tolerance .
