mirror of
https://github.com/penpot/penpot.git
synced 2025-07-02 05:17:17 +02: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]
|
[^number v]
|
||||||
(- 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
|
(defn floor
|
||||||
"Returns the largest integer less than or
|
"Returns the largest integer less than or
|
||||||
equal to a given number."
|
equal to a given number."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue