Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed scale issue in conversion function #21

Closed
wants to merge 1 commit into from

Conversation

WillemRomijn-werk
Copy link

fixed a bug where unit conversion used the wrong scale, leading to rounding issues:

val energyInJoule = 13500000 * joule
val valueInKwh = energyInJoule in kiloWattHour

would result in 3.8 kwh instead of the expected 3.75 kwh

@WillemRomijn-werk WillemRomijn-werk requested a review from a team as a code owner January 10, 2025 13:49
@WillemRomijn-werk WillemRomijn-werk force-pushed the fix-for-scale-error-in-conversion branch from a041f98 to f69b582 Compare January 10, 2025 14:16
Copy link
Contributor

@BaukjeD BaukjeD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! 🛠️ Also good idea to make tickets for more improvements and do a technical deep dive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants