Category on NSView which allows you to calculate the point on the edge of a rectangle that a line passing through the center of that rectangle will hit.