I noticed that in the test files this pattern is already used, with inline poly and line helpers defined. It would be really nice to be able to use this out of the box, because defining polygons or lines gets tedious having to do new Point(...), new Point(...), new Point(...) manually.
Some actual code of mine:
let poly = new Polygon(
new Point(rx, rh),
new Point(lx, lh),
new Point(lx, ly),
new Point(rx, ry)
)
Would be nicely simplified to:
let poly = new Polygon(
[rx, rh],
[lx, lh],
[lx, ly],
[rx, ry]
)
It seems like this would be a variant of SimplePoint, as a tuple instead of an object?