Returns the nearest point on line closest to point.
line
point
import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'const pt = Lines.nearest(line, {x:10,y:10}); Copy
import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'const pt = Lines.nearest(line, {x:10,y:10});
If an array of lines is provided, it will be the closest point amongst all the lines
Line or array of lines
Point { x, y }
{ x, y }
Returns the nearest point on
line
closest topoint
.If an array of lines is provided, it will be the closest point amongst all the lines