X675: Near

Given two Points a and b and a delta, return true if the two points are within delta units of each other. That is, return true if the distance between a and b is less than delta.

Note to remember: x and y in Point are declared as int.

Examples:

near(new Point(5,10),new Point(10,10),100) -> true
near(new Point(10,10),new Point(100,100),100) -> false

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.