0
Fork 0
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:
Andrey Antukh 2023-08-25 12:27:00 +02:00 committed by Andrés Moya
parent a9d2cc227b
commit a82ee01d99

View file

@ -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"