From 31cf613f154953adbc9a339f498cde2c03741c98 Mon Sep 17 00:00:00 2001 From: Nick Nichols Date: Sun, 13 Oct 2024 21:20:16 +0000 Subject: [PATCH] Fix ns sorting --- src/brewtility/precision.cljc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/brewtility/precision.cljc b/src/brewtility/precision.cljc index 55aff62f..cf126f01 100644 --- a/src/brewtility/precision.cljc +++ b/src/brewtility/precision.cljc @@ -1,7 +1,6 @@ (ns brewtility.precision "Namespace for handling numeric precision, rounding, and approximation." - {:added "1.0"} - #?(:clj (:import [java.math RoundingMode]))) + {:added "1.0"}) (defn approximates? @@ -25,7 +24,7 @@ :see-also ["->1dp" "->2dp" "->3dp"]} [^double x ^long num-decimals] (double - #?(:clj (.setScale (bigdec x) num-decimals RoundingMode/HALF_UP) + #?(:clj (.setScale (bigdec x) num-decimals java.math.RoundingMode/HALF_UP) :cljs (let [denominator (Math/pow 10.0 (double num-decimals)) numerator (Math/round (* x denominator))] (/ numerator denominator)))))