mirror of
https://github.com/penpot/penpot.git
synced 2025-02-26 16:56:11 -05:00
Add ^boolean typehints to matrix? and point? predicates.
Performance optimizations.
This commit is contained in:
parent
d9a5c06106
commit
1e9e9ef6d1
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@
|
||||||
(let [[a b c d tx ty] v]
|
(let [[a b c d tx ty] v]
|
||||||
(Matrix. a b c d tx ty))))
|
(Matrix. a b c d tx ty))))
|
||||||
|
|
||||||
(defn matrix?
|
(defn ^boolean matrix?
|
||||||
"Return true if `v` is Matrix instance."
|
"Return true if `v` is Matrix instance."
|
||||||
[v]
|
[v]
|
||||||
(instance? Matrix v))
|
(instance? Matrix v))
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
(-point [v]
|
(-point [v]
|
||||||
(Point. (first v) (second v))))
|
(Point. (first v) (second v))))
|
||||||
|
|
||||||
(defn point?
|
(defn ^boolean point?
|
||||||
"Return true if `v` is Point instance."
|
"Return true if `v` is Point instance."
|
||||||
[v]
|
[v]
|
||||||
(instance? Point v))
|
(instance? Point v))
|
||||||
|
|
Loading…
Add table
Reference in a new issue