diff --git a/src/uxbox/util/geom/point.cljs b/src/uxbox/util/geom/point.cljs index ce5f4efe4f..a5de1f4c4f 100644 --- a/src/uxbox/util/geom/point.cljs +++ b/src/uxbox/util/geom/point.cljs @@ -86,6 +86,13 @@ (Point. (* (:x p) (:x other)) (* (:y p) (:y other))))) +(defn divide + [p other] + {:pre [(point? p)]} + (let [other (-point other)] + (Point. (/ (:x p) (:x other)) + (/ (:y p) (:y other))))) + (defn distance "Calculate the distance between two points." [p other]