From 73260b53f10186d8399e3bb6503c93eda826ffde Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 30 Jan 2016 19:05:12 +0200 Subject: [PATCH] Add more functions to math ns. --- src/uxbox/util/math.cljs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/uxbox/util/math.cljs b/src/uxbox/util/math.cljs index 5c79e15af3..ecea5997d0 100644 --- a/src/uxbox/util/math.cljs +++ b/src/uxbox/util/math.cljs @@ -26,6 +26,16 @@ [^number v] (- v)) +(defn sqrt + "Returns the square root of a number." + [v] + (js/Math.sqrt v)) + +(defn pow + "Returns the base to the exponent power." + [b e] + (js/Math.pow b e)) + (defn floor "Returns the largest integer less than or equal to a given number."