mirror of
https://github.com/penpot/penpot.git
synced 2025-03-16 09:41:41 -05:00
🐛 Fix problem when resizing layout to zero size
This commit is contained in:
parent
da60911d81
commit
3fe5cd3752
1 changed files with 6 additions and 6 deletions
|
@ -363,10 +363,10 @@
|
|||
c2 (+ (* a2 (:x c)) (* b2 (:y c)))
|
||||
|
||||
;; Cramer's rule
|
||||
det (- (* a1 b2) (* a2 b1))]
|
||||
det (- (* a1 b2) (* a2 b1))
|
||||
det (if (mth/almost-zero? det) 0.001 det)
|
||||
|
||||
;; If almost zero the lines are parallel
|
||||
(when (not (mth/almost-zero? det))
|
||||
(let [x (/ (- (* b2 c1) (* b1 c2)) det)
|
||||
y (/ (- (* c2 a1) (* c1 a2)) det)]
|
||||
(gpt/point x y)))))
|
||||
x (/ (- (* b2 c1) (* b1 c2)) det)
|
||||
y (/ (- (* c2 a1) (* c1 a2)) det)]
|
||||
|
||||
(gpt/point x y)))
|
||||
|
|
Loading…
Add table
Reference in a new issue