diff options
author | Eduardo Julian | 2019-03-23 00:56:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-03-23 00:56:55 -0400 |
commit | 90dbb19a8e826fe3ab367fa73b36ce932610b330 (patch) | |
tree | ac1de354cc8c2f36f68f82712e06cb968f558700 /stdlib/source/lux/type/unit.lux | |
parent | f28169f3ab674651fceff0c4c9989f5cc62b616b (diff) |
Ported tests for time-related modules.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/type/unit.lux | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux index 49ee2709b..ab971a4d7 100644 --- a/stdlib/source/lux/type/unit.lux +++ b/stdlib/source/lux/type/unit.lux @@ -143,7 +143,9 @@ (def: #export (re-scale from to quantity) (All [si so u] (-> (Scale si) (Scale so) (Qty (si u)) (Qty (so u)))) - (let [[numerator denominator] (|> (:: to ratio) (r./ (:: from ratio)))] + (let [[numerator denominator] (:: r.number / + (:: from ratio) + (:: to ratio))] (|> quantity out (i/* (.int numerator)) |