google / google/codeworld

Should there be a lineSegment primitive?

Offen
#663 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
discussion
Vorherrschende Sprache
Haskell
Sterne
1.3k
Forks
201
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.