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:
parent
48b38281a6
commit
795b32c4b4
1 changed files with 4 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue