From 8b26da4e36dd83f1fee86ccbd43378a97deda5f4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 19 Jan 2016 22:00:06 +0200 Subject: [PATCH] Add abs function to math tools. --- src/uxbox/util/math.cljs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uxbox/util/math.cljs b/src/uxbox/util/math.cljs index 182c0d1fac..ed392183ed 100644 --- a/src/uxbox/util/math.cljs +++ b/src/uxbox/util/math.cljs @@ -2,6 +2,10 @@ "A collection of math utils." (:require [goog.math :as math])) +(defn abs + [^number v] + (js/Math.abs v)) + (defn sin "Returns the sine of a number" [^number v]