turf
turf copied to clipboard
turf-nearest-point-on-line vs turf-point-to-line-distance
Hi,
I was comparing the source of https://github.com/Turfjs/turf/blob/master/packages/turf-nearest-point-on-line/index.ts and https://github.com/Turfjs/turf/blob/master/packages/turf-point-to-line-distance/index.ts
And noticed both files use a different approach to finding the closest point on a line segment. Maybe I don't completely follow along the nearest-point-on-line logic, but wouldn't it make sense if they use a similar algorithm?