Pregunta de entrevista de Valve Corporation

How do you calculate the distance between two rectangles? (in code)