Skip to content

consider adding line.points #109

@ianstormtaylor

Description

@ianstormtaylor

This way APIs could accept an interface of { points: Point[] } and be made to work with both Polygon-type shapes and Line-type shapes easily.

This would also allow for destructuring line.points to quickly renaming variables, for example:

// could be...
let [a, b] = line.points

// instead of...
let a = line.p1
let b = line.p2

(I'm just opening issues as I use the library and run into problems or inconveniences, but let me know if you'd prefer I not open these kind of ideas issues.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions