Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Common/UnitDefinitions/Density.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,22 @@
"Abbreviations": [ "ppg (imp.)" ]
}
]
},
{
"SingularName": "KilogramPerLiter",
"PluralName": "KilogramsPerLiter",
"BaseUnits": {
"L": "Decimeter",
"M": "Kilogram"
},
"FromUnitToBaseFunc": "x*1e3",
"FromBaseToUnitFunc": "x/1e3",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kg/l" ]
}
]
}
]
}
}
3 changes: 3 additions & 0 deletions UnitsNet.Tests/CustomCode/DensityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class DensityTests : DensityTestsBase
protected override double PoundsPerCubicInchInOneKilogramPerCubicMeter => 3.61272923e-5;

protected override double PoundsPerUSGallonInOneKilogramPerCubicMeter => 8.3454045e-3;

protected override double PoundsPerImperialGallonInOneKilogramPerCubicMeter => 1.002241e-2;

protected override double TonnesPerCubicCentimeterInOneKilogramPerCubicMeter => 1e-9;
Expand Down Expand Up @@ -84,6 +85,8 @@ public class DensityTests : DensityTestsBase

protected override double MicrogramsPerCubicMeterInOneKilogramPerCubicMeter => 1e9;

protected override double KilogramsPerLiterInOneKilogramPerCubicMeter => 1e-3;

[Fact]
public static void DensityTimesVolumeEqualsMass()
{
Expand Down

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

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

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

17 changes: 17 additions & 0 deletions UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs

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

1 change: 1 addition & 0 deletions UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs

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

1 change: 1 addition & 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.