Im wondering how could i find if 2 square share a same side.
i have 2 information:
position and size
position is the left up corner of the square
+---+---+
| s |
| s |
+---+---+
here s is the shared side of both square
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you lack “orientation” as a datum, we will assume that they are orthogonal to the axes. At this point it becomes a matter of checking if either of the horizontal or vertical edges are collinear (which is trivial since you don’t need to worry about orientation), and then seeing if either corner falls within the other square’s side or vice versa.