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); Copy
import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'Lines.length(ptA, ptB);
First point
Second point
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); Copy
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);
Line
Returns length of line, polyline or between two points
Param: aOrLine
Point A, line or polyline (array of lines)
Param: pointB
Point B, if first parameter is a point
Returns
Length (total accumulated length for arrays)