Distance between two rectangles

BlitzPlus Forums/BlitzPlus Programming/Distance between two rectangles

Hi All

Any one know how to calculate the distance between 2 rectangles???

If the two rectangles overlap it should return a distance of 0, else it should return the distance in pixels of the two closest points of the rectanges.

Ta

Mr Brine