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 closed?]
|
||||
(map vector
|
||||
points
|
||||
(-> (rest points)
|
||||
(vec)
|
||||
(cond-> closed?
|
||||
(conj (first points)))))))
|
||||
(map vector points
|
||||
(cond-> (rest points)
|
||||
(true? closed?)
|
||||
(concat (list (first points)))))))
|
||||
|
||||
(defn intersects-lines?
|
||||
"Checks if two sets of lines intersect in any point"
|
||||
|
|
Loading…
Add table
Reference in a new issue