Valve Corporation interview question

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

Valve Corporation Interview Question: How do you calculate the distance between two rectangles? (in code) | Glassdoor