Project point P onto the line-segment AB‾.