Returns length of line, polyline or between two points

Point A, line or polyline (array of lines)

Point B, if first parameter is a point

Length (total accumulated length for arrays)

  • Returns the length between two points

    import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'
    Lines.length(ptA, ptB);

    Parameters

    Returns number

  • Returns length of line. If a polyline (array of lines) is provided, it is the sum total that is returned.

    import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'
    Lines.length(a: {x:0, y:0}, b: {x: 100, y:100});
    Lines.length(lines);

    Parameters

    Returns number