Move matrix math and svg under uxbox.util ns.

This commit is contained in:
Andrey Antukh 2016-01-17 23:40:42 +02:00
parent ce5675639f
commit db73b0787b
4 changed files with 6 additions and 6 deletions

33
src/uxbox/util/math.cljs Normal file
View file

@ -0,0 +1,33 @@
(ns uxbox.util.math
"A collection of math utils."
(:require [goog.math :as math]))
(defn sin
"Returns the sine of a number"
[^number v]
(js/Math.sin v))
(defn cos
"Returns the cosine of a number."
[^number v]
(js/Math.cos v))
(defn tan
"Returns the tangent of a number."
[^number v]
(js/Math.tan v))
(defn neg
"Negate the number"
[^number v]
(- v))
(defn radiants
"Converts degrees to radians."
[^number degrees]
(math/toRadians degrees))
(defn degrees
"Converts radians to degrees."
[^number radiants]
(math/toDegrees radiants))