More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Q1. How can we identify if two squares ( given their diagonal coordinates ) would intersect on xy plane ?
Ans. Using the diagonal coordinates we can easily calculate the other 2 coordinates using Pythagoras.
Any 2 rectangles or squares will intersect if any coordinate of one square would lie within the boundary of another one. A point x,y will be inside the square ( x1,y1;x2,y1;x1,y2;x2,y2 ) is x is between x1 and y2 and y is between y1 and y2.
Help us improve. Please let us know the company, where you were asked this question :