Set the threshold for deciding if two points are the same. The {@link #isNear(Point2D, Point2D)} method uses this value to check if a new point needs to be registered.
@param t The new threshold.
*/
publicvoidsetNearbyThreshold(doublet){
threshold=t;
}
/**
Get the threshold for deciding if two points are the same. The {@link #isNear(Point2D, Point2D)} method uses this value to check if a new point needs to be registered.
@return The nearby threshold.
*/
publicdoublegetNearbyThreshold(){
returnthreshold;
}
/**
Find out if two points are nearby.
@param point1 The first point.
@param point2 The second point.
@return True iff the two points are within the nearby threshold.