Function toFlatArray

Returns an array representation of line: [a.x, a.y, b.x, b.y]

See fromFlatArray to create a line from this representation.

import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'
Lines.toFlatArray(line);
Lines.toFlatArray(pointA, pointB);
  • Parameters

    Returns readonly number[]