Content-Length: 214479 | pFad | http://github.com/anteoas/broch/commit/a8b652da3078d6b27fc7ea52823ca5e1f8ce094f

46 update doc string · anteoas/broch@a8b652d · GitHub
Skip to content

Commit

Permalink
update doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
2food committed Dec 9, 2024
1 parent 9cef4c6 commit a8b652d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/broch/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,14 @@

(defn quantity
"Makes a new quantity of unit and x.
- unit must be a quantity (but the number part is ignored).
- x must be number-ish, i.e. a number, string of number, or another quantity.
`unit` must be a quantity type (but the number part is ignored, and can be nil).
`x` must be number-ish, i.e. a number, string of a number, or another quantity.
If x is a string, it's read with `clojure.core/read-string` and throws if it's not a number.
(Beware of using this on raw user input, since it won't read localized numbers with different decimal marks correctly, like \"12,1\")
If x is a quantity, it will be converted (or throw exception if incompatible)."
[unit x]
(impl/quantity unit x))
Expand Down Expand Up @@ -354,4 +360,3 @@
(def becquerels (new-unit :radioactivity "Bq" {seconds -1}))
(def grays (new-unit :absorbed-dose "Gy" {joules 1 kilograms -1}))
(def sieverts (new-unit :equivalent-dose "Sv" {joules 1 kilograms -1}))

0 comments on commit a8b652d

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/anteoas/broch/commit/a8b652da3078d6b27fc7ea52823ca5e1f8ce094f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy