cljs.math/rint

functionsince v1.11.50Edit
(rint a)

Source docstring:
Returns the double closest to a and equal to a mathematical integer.
If two values are equally close, return the even one.
If a is ##NaN or ##Inf or ##-Inf or zero => a
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#rint-double-
Source code @ clojurescript:src/main/cljs/cljs/math.cljs
(defn ^number rint
  {:added "1.11.10"}
  [a]
  (let [sign (copy-sign 1.0, a)
        a (Math/abs a)
        a (if (< a TWO-TO-THE-52)
            (- (+ TWO-TO-THE-52 a) TWO-TO-THE-52) a)]
    (* sign a)))