0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 22:49:01 -05:00

🐛 Fix division by zero in bool operation

This commit is contained in:
alonso.torres 2022-01-10 15:28:28 +01:00
parent a8249b73b6
commit 50fd44d3f2
2 changed files with 4 additions and 1 deletions

View file

@ -150,6 +150,7 @@
- Remove button after import process finish [Taiga #2215](https://tree.taiga.io/project/penpot/issue/2215)
- Fix problem with styles in the viewer [Taiga #2467](https://tree.taiga.io/project/penpot/issue/2467)
- Fix default state in viewer [Taiga #2465](https://tree.taiga.io/project/penpot/issue/2465)
- Fix division by zero in bool operation [Taiga #2349](https://tree.taiga.io/project/penpot/issue/2349)
### :heart: Community contributions by (Thank you!)

View file

@ -119,7 +119,9 @@
;; normalize value
d (mth/sqrt (+ (* x x) (* y y)))]
(gpt/point (/ x d) (/ y d))))
(if (mth/almost-zero? d)
(gpt/point 0 0)
(gpt/point (/ x d) (/ y d)))))
(defn curve-windup
[curve t]