title: calculating distance between a point and a rectangular box (nearest point)
body: <p>is there a easy formula to calculate this? i've been working on some math but i can only find  a way to calculate the distance directed to the center of the box, not directed to the nearest point.. are there some resources on this problem?</p>