Skip to content

Commit

Permalink
Add VolumeFlow prefixes Deca, Hecto (#1362)
Browse files Browse the repository at this point in the history
Fixes #1253

Added the prefixes 'deca' and 'hecto', since, at least for the 'hecto'
prefix, it's a very common unit used in the brewing industry. Added the
'deca' prefix while I was at it. 

---------

Co-authored-by: André Rodi <andre.rodi@kaspar-schulz.de>
  • Loading branch information
andrerodi and André Rodi authored Feb 14, 2024
1 parent 6604660 commit d980ec1
Show file tree
Hide file tree
Showing 12 changed files with 1,234 additions and 140 deletions.
8 changes: 4 additions & 4 deletions Common/UnitDefinitions/VolumeFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"PluralName": "LitersPerSecond",
"FromUnitToBaseFunc": "{x} / 1000",
"FromBaseToUnitFunc": "{x} * 1000",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ],
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
Expand All @@ -198,7 +198,7 @@
"PluralName": "LitersPerMinute",
"FromUnitToBaseFunc": "{x} / 60000.00000",
"FromBaseToUnitFunc": "{x} * 60000.00000",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ],
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
Expand All @@ -215,7 +215,7 @@
"PluralName": "LitersPerHour",
"FromUnitToBaseFunc": "{x} / 3600000.000",
"FromBaseToUnitFunc": "{x} * 3600000.000",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ],
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
Expand All @@ -232,7 +232,7 @@
"PluralName": "LitersPerDay",
"FromUnitToBaseFunc": "{x} / 86400000",
"FromBaseToUnitFunc": "{x} * 86400000",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ],
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
Expand Down
10 changes: 9 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,15 @@
"MegaliterPerMinute": 64,
"MegaliterPerSecond": 65,
"MegaukGallonPerDay": 73,
"MegausGallonPerDay": 77
"MegausGallonPerDay": 77,
"DecaliterPerDay": 71,
"DecaliterPerHour": 78,
"DecaliterPerMinute": 67,
"DecaliterPerSecond": 70,
"HectoliterPerDay": 74,
"HectoliterPerHour": 72,
"HectoliterPerMinute": 75,
"HectoliterPerSecond": 69
},
"VolumeFlowPerArea": {
"CubicFootPerMinutePerSquareFoot": 1,
Expand Down
104 changes: 104 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs

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.

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

16 changes: 16 additions & 0 deletions UnitsNet.Tests/CustomCode/VolumeFlowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@ public class VolumeFlowTests : VolumeFlowTestsBase

protected override double UsGallonsPerSecondInOneCubicMeterPerSecond => 2.64172052358148E2;

protected override double DecalitersPerDayInOneCubicMeterPerSecond => 8.64E6;

protected override double DecalitersPerHourInOneCubicMeterPerSecond => 360_000;

protected override double DecalitersPerMinuteInOneCubicMeterPerSecond => 6_000;

protected override double DecalitersPerSecondInOneCubicMeterPerSecond => 100;

protected override double HectolitersPerDayInOneCubicMeterPerSecond => 864_000;

protected override double HectolitersPerHourInOneCubicMeterPerSecond => 36_000;

protected override double HectolitersPerMinuteInOneCubicMeterPerSecond => 600;

protected override double HectolitersPerSecondInOneCubicMeterPerSecond => 10;

[Theory]
[InlineData(20, 2, 40)]
[InlineData(20, 62, 1240)]
Expand Down
Loading

0 comments on commit d980ec1

Please sign in to comment.