add option to clamp to line or to just get closest point on infinite line.