mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add more functions to math ns.
This commit is contained in:
parent
11249245ae
commit
73260b53f1
1 changed files with 10 additions and 0 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Reference in a new issue