Right, not sure how many of you will be able to help, but basically what I need to do is determine the side of a rectangle that another rectangle is the closest to.
Take the following image as an example, I need to find a way of working out which side (represented by the different grey, triangular sectors) it is closest to - To help I've written in the side that it should come up with in blue.
(Sorry for the crappy example)