Pregunta de entrevista de Autodesk

How to detect if two rectangles overlap?