Valve Corporation interview question

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