diff --git a/src/uxbox/util/math.cljs b/src/uxbox/util/math.cljs index a870fbdd9..5c79e15af 100644 --- a/src/uxbox/util/math.cljs +++ b/src/uxbox/util/math.cljs @@ -44,6 +44,10 @@ [^number v] (js/Math.ceil v)) +(defn precision + [^number v ^number n] + (js/parseFloat (.toFixed v n))) + (defn radians "Converts degrees to radians." [^number degrees]