0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Add precision helper on math ns.

This commit is contained in:
Andrey Antukh 2016-01-23 22:11:11 +02:00
parent 48b38281a6
commit 795b32c4b4

View file

@ -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]