You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like a great library to help me with a project I need to complete.
I was wondering how you would represent a conversion between two units with differing zero points (e.g. Celsius to Fahrenheit) using this library?
Also, if a UOM conversion involves some lookup value to be used (e.g. going from volume to mass requires knowing the density of the liquid) is there a suggested approach for doing this.
The text was updated successfully, but these errors were encountered:
The answer to your second question is to that you need a unit for density. (which I've just added a couple of in 44cc78b)
Then you define a constant with the density of your liquid. According to google, the density of water is about 997 kg/m³ (at 25°C). So that could be defined like this:
(defwater-density-at-25C (b/kilograms-per-cubic-meter997))
; then you could do your calculations with it
(b/* water-density-at-25C (b/liters300))
; => #broch/quantity[299.1 "kg"]
This looks like a great library to help me with a project I need to complete.
I was wondering how you would represent a conversion between two units with differing zero points (e.g. Celsius to Fahrenheit) using this library?
Also, if a UOM conversion involves some lookup value to be used (e.g. going from volume to mass requires knowing the density of the liquid) is there a suggested approach for doing this.
The text was updated successfully, but these errors were encountered: