-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add UsGallonsPerMile, ImperialGallonPerMile, MegaukGallonPerDay, MegausGallonPerDay #1225
Add UsGallonsPerMile, ImperialGallonPerMile, MegaukGallonPerDay, MegausGallonPerDay #1225
Conversation
@@ -40,5 +40,7 @@ public class VolumePerLengthTests : VolumePerLengthTestsBase | |||
protected override double LitersPerKilometerInOneCubicMeterPerMeter => 1E6; | |||
|
|||
protected override double LitersPerMillimeterInOneCubicMeterPerMeter => 1; | |||
|
|||
protected override double UsGallonsPerMileInOneCubicMeterPerMeter => 4.251439077933434e5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you used the "miles per gallon" constant, instead of "gallons per mile".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, it seems converters mix and match m/m³ and m³/m and it was easy to confuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found 4.25143707430272e5
(source)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmilnthorp
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the constants were not correct, please double check
My bad, they were correct, but I propose improving the precision
… MegausGallonPerDay
Improve precision of test constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I pushed minor improvements to the test constants and added links to the sources.
I am sorry about removing wolframalpha comments during merge. Should I add wolframalpha links to any new units in the future? Is there a guideline about it that I missed? |
No problem, I added them back. There is no guideline about documenting sources, but I realized this is probably a Good Thing (tm) since we have had a bit more focus on preserving high precision in conversion functions lately. I'll add a note about it in the wiki for adding a new unit. |
Sorry for the late turnaround, we usually get things done quicker. Work and family has been eating all my time the past few weeks. Thanks for your effort! Nuget should be out shortly. |
Added info about documenting source of value: |
ImperialGallonPerMile
UsGallonPerMile
MegausGallonPerDay
MegaukGallonPerDay