Given two pixels on a computer screen with integer coordinates (x1, y1) and (x2, y2), write conditions

Question:

Given two pixels on a computer screen with integer coordinates (x1, y1) and (x2, y2), write conditions to test whether they are

a. The same pixel.
b. Very close together (with distance < 5).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: