Function fromNumbers

Returns an array of points from an array of numbers.

Array can be a continuous series of x, y values:

[1,2,3,4] would yield: [{x:1, y:2}, {x:3, y:4}]

Or it can be an array of arrays:

[[1,2], [3,4]] would yield: [{x:1, y:2}, {x:3, y:4}]
  • Parameters

    • Rest...coords: readonly number[] | readonly (readonly number[])[]

    Returns readonly Point[]