Skip to content

Commit

Permalink
Improve precision of PR 1334 (#1335)
Browse files Browse the repository at this point in the history
Fixup of 202eafa - Add density unit PoundsPerCubicYard + Kilo prefix
(#1334)

Use precise calculation from definitions.
  • Loading branch information
angularsen authored Dec 6, 2023
1 parent 4ca52fe commit edf08b9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
5 changes: 3 additions & 2 deletions Common/UnitDefinitions/Density.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@
{
"SingularName": "PoundPerCubicYard",
"PluralName": "PoundsPerCubicYard",
"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.",
"BaseUnits": {
"L": "Yard",
"M": "Pound"
},
"FromUnitToBaseFunc": "{x} / 1.685554936",
"FromBaseToUnitFunc": "{x} * 1.685554936",
"FromUnitToBaseFunc": "{x} / (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
"FromBaseToUnitFunc": "{x} * (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
"Prefixes": [ "Kilo" ],
"Localization": [
{
Expand Down
8 changes: 4 additions & 4 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Density.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions UnitsNet/GeneratedCode/Quantities/Density.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions UnitsNet/GeneratedCode/Units/DensityUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit edf08b9

Please sign in to comment.