Skip to content

Commit

Permalink
[Format] Auto-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nnichols authored and github-actions[bot] committed Feb 19, 2024
1 parent 9a3b070 commit 53151b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## Source

This change log was generated by [sealog.](https://github.com/Wall-Brew-Co/lein-sealog)
This changelog was generated by [sealog.](https://github.com/Wall-Brew-Co/lein-sealog)
Please do not edit it directly. Instead, edit the source data files and regenerate this file.
1 change: 1 addition & 0 deletions src/brewtility/calculations.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
(throw (ex-info "Cannot calculate color with non-numeric values" {:amount amount
:color color}))))


(defn calculate-malt-color-units
"Given a collection of `common-beer-format` conforming `fermentables`, and a conformed `batch-size` in liters, return the overall Malt Color Units for a recipe."
{:added "1.0"
Expand Down
8 changes: 4 additions & 4 deletions src/brewtility/precision.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
:see-also ["->1dp" "->2dp" "->3dp"]}
[^double x ^long num-decimals]
(double
#?(:clj (.setScale (bigdec x) num-decimals RoundingMode/HALF_UP)
:cljs (let [denominator (Math/pow 10.0 (double num-decimals))
numerator (Math/round (* x denominator))]
(/ numerator denominator)))))
#?(:clj (.setScale (bigdec x) num-decimals RoundingMode/HALF_UP)
:cljs (let [denominator (Math/pow 10.0 (double num-decimals))
numerator (Math/round (* x denominator))]
(/ numerator denominator)))))


(defn ->1dp
Expand Down

0 comments on commit 53151b0

Please sign in to comment.