ClojureDocs

Nav

Namespaces

signum

clojure.math

Available since 1.11
  • (signum d)
Returns the signum function of d - zero for zero, 1.0 if >0, -1.0 if <0.
If d is ##NaN => ##NaN
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#signum-double-