mirror of
https://github.com/penpot/penpot.git
synced 2026-06-01 13:10:21 +00:00
Add nan? and finite? predicates to math ns.
This commit is contained in:
parent
1e9e9ef6d1
commit
3977748e34
@ -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…
x
Reference in New Issue
Block a user