From 1e9e9ef6d161cb805489a9bac3c00ec912a73fc5 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 11 Aug 2016 18:12:47 +0300 Subject: [PATCH] Add ^boolean typehints to matrix? and point? predicates. Performance optimizations. --- src/uxbox/main/geom/matrix.cljs | 2 +- src/uxbox/main/geom/point.cljs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxbox/main/geom/matrix.cljs b/src/uxbox/main/geom/matrix.cljs index 14175b6c40..92712d6679 100644 --- a/src/uxbox/main/geom/matrix.cljs +++ b/src/uxbox/main/geom/matrix.cljs @@ -44,7 +44,7 @@ (let [[a b c d tx ty] v] (Matrix. a b c d tx ty)))) -(defn matrix? +(defn ^boolean matrix? "Return true if `v` is Matrix instance." [v] (instance? Matrix v)) diff --git a/src/uxbox/main/geom/point.cljs b/src/uxbox/main/geom/point.cljs index 079b538d40..c9dce89b81 100644 --- a/src/uxbox/main/geom/point.cljs +++ b/src/uxbox/main/geom/point.cljs @@ -35,7 +35,7 @@ (-point [v] (Point. (first v) (second v)))) -(defn point? +(defn ^boolean point? "Return true if `v` is Point instance." [v] (instance? Point v))