google / google/codeworld

Should there be a lineSegment primitive?

Open
#663 0 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

It's often awkward and confusing to use `polyline` to get a single line. Perhaps there should exist primitives `lineSegment` and `thickLineSegment` that take exactly two coordinate pairs as arguments (or just four numbers?), and produce a line segment.

Note that the other polygonal-style shapes: `polygon`, `curve`, and `closedCurve` and their thick and solid variants, depend on having at least three points, so there would be no need to do the same there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.