Added function pointPositionOnSegment().