mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 05:58:47 +00:00
⚡ Add missing type hints on matrix type functions
This commit is contained in:
parent
dfdc9c9fa5
commit
91b5a0afdd
@ -72,7 +72,7 @@
|
|||||||
(apply matrix params)))
|
(apply matrix params)))
|
||||||
|
|
||||||
(defn close?
|
(defn close?
|
||||||
[m1 m2]
|
[^Matrix m1 ^Matrix m2]
|
||||||
(and (mth/close? (.-a m1) (.-a m2))
|
(and (mth/close? (.-a m1) (.-a m2))
|
||||||
(mth/close? (.-b m1) (.-b m2))
|
(mth/close? (.-b m1) (.-b m2))
|
||||||
(mth/close? (.-c m1) (.-c m2))
|
(mth/close? (.-c m1) (.-c m2))
|
||||||
@ -80,7 +80,7 @@
|
|||||||
(mth/close? (.-e m1) (.-e m2))
|
(mth/close? (.-e m1) (.-e m2))
|
||||||
(mth/close? (.-f m1) (.-f m2))))
|
(mth/close? (.-f m1) (.-f m2))))
|
||||||
|
|
||||||
(defn unit? [m1]
|
(defn unit? [^Matrix m1]
|
||||||
(and (some? m1)
|
(and (some? m1)
|
||||||
(mth/close? (.-a m1) 1)
|
(mth/close? (.-a m1) 1)
|
||||||
(mth/close? (.-b m1) 0)
|
(mth/close? (.-b m1) 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user