getClippedPosOnEdge = function(bounds, edgeID, p1, p2) {
            return clippedPos[edgeID](bounds, p1, p2);
          }
method for getting the position on the edge
@private
@param {Rect} bounds
@param {Number} edgeID
@param {Vec2D} p1
@param {Vec2D} p2
@returns Vec2D