ixfx
    Preparing search index...

    Function distance

    • Returns the distance of point to the nearest point on line.

      import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'
      const d = Lines.distance(line, {x:10,y:10});

      If an array of lines is provided, the shortest distance is returned.

      Parameters

      Returns number

      Distance