mirror of
https://github.com/penpot/penpot.git
synced 2026-02-17 17:53:04 +00:00
Add nan? and finite? predicates to math ns.
This commit is contained in:
@@ -9,6 +9,14 @@
|
||||
"A collection of math utils."
|
||||
(:require [goog.math :as math]))
|
||||
|
||||
(defn ^boolean nan?
|
||||
[v]
|
||||
(js/isNaN v))
|
||||
|
||||
(defn ^boolean finite?
|
||||
[v]
|
||||
(js/isFinite v))
|
||||
|
||||
(defn abs
|
||||
[^number v]
|
||||
(js/Math.abs v))
|
||||
|
||||
Reference in New Issue
Block a user