mirror of
https://github.com/penpot/penpot.git
synced 2025-06-28 20:56:58 +02:00
Add nan? and finite? predicates to math ns.
This commit is contained in:
parent
1e9e9ef6d1
commit
3977748e34
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,14 @@
|
||||||
"A collection of math utils."
|
"A collection of math utils."
|
||||||
(:require [goog.math :as math]))
|
(:require [goog.math :as math]))
|
||||||
|
|
||||||
|
(defn ^boolean nan?
|
||||||
|
[v]
|
||||||
|
(js/isNaN v))
|
||||||
|
|
||||||
|
(defn ^boolean finite?
|
||||||
|
[v]
|
||||||
|
(js/isFinite v))
|
||||||
|
|
||||||
(defn abs
|
(defn abs
|
||||||
[^number v]
|
[^number v]
|
||||||
(js/Math.abs v))
|
(js/Math.abs v))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue