Skip to content

Commit 490bca2

Browse files
tmilnthorpangularsen
authored andcommitted
Adding A/in² and A/ft² for ElectricCurrentDensity. Also adding BaseUnits while I'm in there (#641)
1 parent c43de5d commit 490bca2

File tree

8 files changed

+115
-1
lines changed

8 files changed

+115
-1
lines changed

Common/UnitDefinitions/ElectricCurrentDensity.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{
1212
"SingularName": "AmperePerSquareMeter",
1313
"PluralName": "AmperesPerSquareMeter",
14+
"BaseUnits": {
15+
"L": "Meter",
16+
"I": "Ampere"
17+
},
1418
"FromUnitToBaseFunc": "x",
1519
"FromBaseToUnitFunc": "x",
1620
"Localization": [
@@ -19,6 +23,38 @@
1923
"Abbreviations": [ "A/m²" ]
2024
}
2125
]
26+
},
27+
{
28+
"SingularName": "AmperePerSquareInch",
29+
"PluralName": "AmperesPerSquareInch",
30+
"BaseUnits": {
31+
"L": "Inch",
32+
"I": "Ampere"
33+
},
34+
"FromUnitToBaseFunc": "x * 1.5500031000062000e3",
35+
"FromBaseToUnitFunc": "x / 1.5500031000062000e3",
36+
"Localization": [
37+
{
38+
"Culture": "en-US",
39+
"Abbreviations": [ "A/in²" ]
40+
}
41+
]
42+
},
43+
{
44+
"SingularName": "AmperePerSquareFoot",
45+
"PluralName": "AmperesPerSquareFoot",
46+
"BaseUnits": {
47+
"L": "Foot",
48+
"I": "Ampere"
49+
},
50+
"FromUnitToBaseFunc": "x * 1.0763910416709722e1",
51+
"FromBaseToUnitFunc": "x / 1.0763910416709722e1",
52+
"Localization": [
53+
{
54+
"Culture": "en-US",
55+
"Abbreviations": [ "A/ft²" ]
56+
}
57+
]
2258
}
2359
]
2460
}

UnitsNet.Tests/CustomCode/ElectricCurrentDensityTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ namespace UnitsNet.Tests.CustomCode
2828
public class ElectricCurrentDensityTests : ElectricCurrentDensityTestsBase
2929
{
3030
protected override double AmperesPerSquareMeterInOneAmperePerSquareMeter => 1;
31+
protected override double AmperesPerSquareInchInOneAmperePerSquareMeter => 6.4516e-4;
32+
protected override double AmperesPerSquareFootInOneAmperePerSquareMeter => 9.290304e-2;
3133
}
3234
}

UnitsNet.WindowsRuntimeComponent/GeneratedCode/Quantities/ElectricCurrentDensity.WindowsRuntimeComponent.g.cs

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

UnitsNet.WindowsRuntimeComponent/GeneratedCode/UnitAbbreviationsCache.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.WindowsRuntimeComponent/GeneratedCode/Units/ElectricCurrentDensityUnit.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/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs

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

UnitsNet/GeneratedCode/UnitAbbreviationsCache.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/GeneratedCode/Units/ElectricCurrentDensityUnit.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.

0 commit comments

Comments
 (0)