Removed unused function IsCloseTo(x,y)