Skip to content

Commit 7064bb5

Browse files
AnthonywolfeAnthonywolfe
andauthored
Added more units to ElectricCurrentGradient (#874)
* Added AmperePerMillisecond, AmperePerMicrosecond, and AmperePerNanosecond to ElectricCurrentGradient * Fixed the units being backwards * Changed the PluralName for the added units Co-authored-by: Anthonywolfe <[email protected]>
1 parent 43a6070 commit 7064bb5

File tree

12 files changed

+244
-4
lines changed

12 files changed

+244
-4
lines changed

Common/UnitDefinitions/ElectricCurrentGradient.json

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"Name": "ElectricCurrentGradient",
33
"BaseUnit": "AmperePerSecond",
44
"XmlDoc": "In electromagnetism, the current gradient describes how the current changes in time.",
@@ -18,6 +18,54 @@
1818
"Abbreviations": [ "A/s" ]
1919
}
2020
]
21+
},
22+
{
23+
"SingularName": "AmperePerMillisecond",
24+
"PluralName": "AmperesPerMillisecond",
25+
"BaseUnits": {
26+
"T": "Millisecond",
27+
"I": "Ampere"
28+
},
29+
"FromUnitToBaseFunc": "x*1E3",
30+
"FromBaseToUnitFunc": "x/1E3",
31+
"Localization": [
32+
{
33+
"Culture": "en-US",
34+
"Abbreviations": [ "A/ms" ]
35+
}
36+
]
37+
},
38+
{
39+
"SingularName": "AmperePerMicrosecond",
40+
"PluralName": "AmperesPerMicrosecond",
41+
"BaseUnits": {
42+
"T": "Microsecond",
43+
"I": "Ampere"
44+
},
45+
"FromUnitToBaseFunc": "x*1E6",
46+
"FromBaseToUnitFunc": "x/1E6",
47+
"Localization": [
48+
{
49+
"Culture": "en-US",
50+
"Abbreviations": [ "A/μs" ]
51+
}
52+
]
53+
},
54+
{
55+
"SingularName": "AmperePerNanosecond",
56+
"PluralName": "AmperesPerNanosecond",
57+
"BaseUnits": {
58+
"T": "Nanosecond",
59+
"I": "Ampere"
60+
},
61+
"FromUnitToBaseFunc": "x*1E9",
62+
"FromBaseToUnitFunc": "x/1E9",
63+
"Localization": [
64+
{
65+
"Culture": "en-US",
66+
"Abbreviations": [ "A/ns" ]
67+
}
68+
]
2169
}
2270
]
2371
}

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

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentGradientExtensions.g.cs

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

UnitsNet.Tests/CustomCode/ElectricCurrentGradientTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ public class ElectricCurrentGradientTests : ElectricCurrentGradientTestsBase
2929
{
3030
protected override bool SupportsSIUnitSystem => false;
3131
protected override double AmperesPerSecondInOneAmperePerSecond => 1;
32+
protected override double AmperesPerMillisecondInOneAmperePerSecond => 1e-03;
33+
protected override double AmperesPerMicrosecondInOneAmperePerSecond => 1e-06;
34+
protected override double AmperesPerNanosecondInOneAmperePerSecond => 1e-09;
3235
}
3336
}

UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs

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

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

Lines changed: 51 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: 3 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/ElectricCurrentGradientUnit.g.cs

Lines changed: 3 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)