mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
✨ Add minor improvement to points->lines helper
This commit is contained in:
parent
a9d2cc227b
commit
a82ee01d99
1 changed files with 4 additions and 6 deletions
|
@ -73,12 +73,10 @@
|
||||||
(points->lines points true))
|
(points->lines points true))
|
||||||
|
|
||||||
([points closed?]
|
([points closed?]
|
||||||
(map vector
|
(map vector points
|
||||||
points
|
(cond-> (rest points)
|
||||||
(-> (rest points)
|
(true? closed?)
|
||||||
(vec)
|
(concat (list (first points)))))))
|
||||||
(cond-> closed?
|
|
||||||
(conj (first points)))))))
|
|
||||||
|
|
||||||
(defn intersects-lines?
|
(defn intersects-lines?
|
||||||
"Checks if two sets of lines intersect in any point"
|
"Checks if two sets of lines intersect in any point"
|
||||||
|
|
Loading…
Add table
Reference in a new issue