0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 17:00:36 -05:00

Add missing type hints on matrix type functions

This commit is contained in:
Andrey Antukh 2023-03-02 23:25:38 +01:00
parent dfdc9c9fa5
commit 91b5a0afdd

View file

@ -72,7 +72,7 @@
(apply matrix params)))
(defn close?
[m1 m2]
[^Matrix m1 ^Matrix m2]
(and (mth/close? (.-a m1) (.-a m2))
(mth/close? (.-b m1) (.-b m2))
(mth/close? (.-c m1) (.-c m2))
@ -80,7 +80,7 @@
(mth/close? (.-e m1) (.-e m2))
(mth/close? (.-f m1) (.-f m2))))
(defn unit? [m1]
(defn unit? [^Matrix m1]
(and (some? m1)
(mth/close? (.-a m1) 1)
(mth/close? (.-b m1) 0)