Skip to content

Commit 11b8373

Browse files
alpacat00dcz
andauthored
Fix precision of gallon volume units (#1237)
Co-authored-by: dcz <[email protected]>
1 parent 83589d1 commit 11b8373

File tree

5 files changed

+64
-40
lines changed

5 files changed

+64
-40
lines changed

Common/UnitDefinitions/Volume.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,10 @@
210210
{
211211
"SingularName": "ImperialGallon",
212212
"PluralName": "ImperialGallons",
213-
"FromUnitToBaseFunc": "{x} * 0.00454609000000181429905810072407",
214-
"FromBaseToUnitFunc": "{x} / 0.00454609000000181429905810072407",
213+
"FromUnitToBaseFunc": "{x} * 0.00454609",
214+
"FromBaseToUnitFunc": "{x} / 0.00454609",
215+
"XmlDocSummary": "The British imperial gallon (frequently called simply \"gallon\") is defined as exactly 4.54609 litres.",
216+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Gallon#Imperial_gallon",
215217
"Prefixes": [ "Kilo", "Mega" ],
216218
"Localization": [
217219
{
@@ -243,8 +245,10 @@
243245
{
244246
"SingularName": "UsGallon",
245247
"PluralName": "UsGallons",
246-
"FromUnitToBaseFunc": "{x} * 0.00378541",
247-
"FromBaseToUnitFunc": "{x} / 0.00378541",
248+
"FromUnitToBaseFunc": "{x} * 0.003785411784",
249+
"FromBaseToUnitFunc": "{x} / 0.003785411784",
250+
"XmlDocSummary": "The US liquid gallon (frequently called simply \"gallon\") is legally defined as 231 cubic inches, which is exactly 3.785411784 litres.",
251+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Gallon#US_liquid_gallon",
248252
"Prefixes": [ "Deca", "Deci", "Hecto", "Kilo", "Mega" ],
249253
"Localization": [
250254
{

UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)