-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Describe the bug
The scale is not set correctly when converting between units. This causes rounding errors in some cases.
To Reproduce
val energyInKwh = 3.75 * kiloWattHour
val energyInJoule1 = energyInKwh `as` joule
val energyInJoule2 = 13500000 * joule
energyInJoule1 shouldBe energyInJoule2 // green
energyInKwh shouldBe energyInJoule1 // green
energyInKwh shouldBe energyInJoule2 // redExpected behavior
The 3rd assertion should be green as well
Metadata
Metadata
Assignees
Labels
No labels