diff --git a/src/uxbox/main/geom/point.cljs b/src/uxbox/main/geom/point.cljs index c9dce89b8..5e4862799 100644 --- a/src/uxbox/main/geom/point.cljs +++ b/src/uxbox/main/geom/point.cljs @@ -158,3 +158,11 @@ [{:keys [x y]} decimanls] (Point. (mth/precision x decimanls) (mth/precision y decimanls))) + + +(defn transform + "Transform a point applying a matrix transfomation." + [{:keys [x y] :as p} {:keys [a b c d tx ty] :as m}] + (Point. (+ (* x a) (* y c) tx) + (+ (* x b) (* y d) ty))) +