Skip to content

Commit 202eafa

Browse files
aharresAndrew Harres
andauthored
Add density unit PoundsPerCubicYard + Kilo prefix (#1334)
This commit just adds two new density units: PoundsPerCubicYard and KilopoundsPerCubicYard. Co-authored-by: Andrew Harres <[email protected]>
1 parent ae7cbe6 commit 202eafa

File tree

11 files changed

+288
-94
lines changed

11 files changed

+288
-94
lines changed

Common/UnitDefinitions/Density.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,24 @@
9999
}
100100
]
101101
},
102+
{
103+
"SingularName": "PoundPerCubicYard",
104+
"PluralName": "PoundsPerCubicYard",
105+
"BaseUnits": {
106+
"L": "Yard",
107+
"M": "Pound"
108+
},
109+
"FromUnitToBaseFunc": "{x} / 1.685554936",
110+
"FromBaseToUnitFunc": "{x} * 1.685554936",
111+
"Prefixes": [ "Kilo" ],
112+
"Localization": [
113+
{
114+
"Culture": "en-US",
115+
"Abbreviations": [ "lb/yd³" ],
116+
"AbbreviationsForPrefixes": { "Kilo": "kip/yd³" }
117+
}
118+
]
119+
},
102120
{
103121
"SingularName": "TonnePerCubicMillimeter",
104122
"PluralName": "TonnesPerCubicMillimeter",

Common/UnitEnumValues.g.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@
225225
"TonnePerCubicMillimeter": 51,
226226
"FemtogramPerDeciliter": 59,
227227
"FemtogramPerLiter": 56,
228-
"FemtogramPerMilliliter": 61
228+
"FemtogramPerMilliliter": 61,
229+
"KilopoundPerCubicYard": 64,
230+
"PoundPerCubicYard": 58
229231
},
230232
"Duration": {
231233
"Day": 1,

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

Lines changed: 26 additions & 0 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: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToDensityExtensionsTest.g.cs

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToDensityExtensions.g.cs

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

UnitsNet.Tests/CustomCode/DensityTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ public class DensityTests : DensityTestsBase
2323

2424
protected override double KilogramsPerCubicMillimeterInOneKilogramPerCubicMeter => 1e-9;
2525

26+
protected override double KilopoundsPerCubicYardInOneKilogramPerCubicMeter => 1.6855549356e-3;
27+
2628
protected override double KilopoundsPerCubicFootInOneKilogramPerCubicMeter => 6.242796e-5;
2729

2830
protected override double KilopoundsPerCubicInchInOneKilogramPerCubicMeter => 3.6127292e-8;
2931

32+
protected override double PoundsPerCubicYardInOneKilogramPerCubicMeter => 1.6855549356;
33+
3034
protected override double PoundsPerCubicFootInOneKilogramPerCubicMeter => 6.242796e-2;
3135

3236
protected override double PoundsPerCubicInchInOneKilogramPerCubicMeter => 3.61272923e-5;

0 commit comments

Comments
 (0)