Skip to content

Commit edf08b9

Browse files
authored
Improve precision of PR 1334 (#1335)
Fixup of 202eafa - Add density unit PoundsPerCubicYard + Kilo prefix (#1334) Use precise calculation from definitions.
1 parent 4ca52fe commit edf08b9

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

Common/UnitDefinitions/Density.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@
102102
{
103103
"SingularName": "PoundPerCubicYard",
104104
"PluralName": "PoundsPerCubicYard",
105+
"XmlDocSummary": "Calculated from the definition of <a href=\"https://en.wikipedia.org/wiki/Pound_(mass)\">pound</a> and <a href=\"https://en.wikipedia.org/wiki/Yard\">yard</a> compared to metric kilogram and meter.",
105106
"BaseUnits": {
106107
"L": "Yard",
107108
"M": "Pound"
108109
},
109-
"FromUnitToBaseFunc": "{x} / 1.685554936",
110-
"FromBaseToUnitFunc": "{x} * 1.685554936",
110+
"FromUnitToBaseFunc": "{x} / (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
111+
"FromBaseToUnitFunc": "{x} * (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
111112
"Prefixes": [ "Kilo" ],
112113
"Localization": [
113114
{

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

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

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

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

UnitsNet/GeneratedCode/Quantities/Density.g.cs

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

UnitsNet/GeneratedCode/Units/DensityUnit.g.cs

Lines changed: 4 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)