Point on line and Point on segment functions added