mirror of
https://github.com/penpot/penpot.git
synced 2026-04-26 11:48:28 +00:00
⚡ Add minor perfromance improvement to is-point-inside-evenodd fn
Replace filter with filterv for avoid an other iteration on the following count operation
This commit is contained in:
parent
64accaa842
commit
d8c1425daf
@ -118,7 +118,7 @@
|
||||
;; Cast a ray from the point in any direction and count the intersections
|
||||
;; if it's odd the point is inside the polygon
|
||||
(->> lines
|
||||
(filter #(intersect-ray? p %))
|
||||
(filterv #(intersect-ray? p %))
|
||||
(count)
|
||||
(odd?)))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user