Skip to content

Commit ac97473

Browse files
authored
Add ElectricPotentialChangeRate (#765)
* created electric potential change rate * Use consistent scientific notation in test values Co-authored-by: Andreas Gullberg Larsen <[email protected]>
1 parent bda6a1e commit ac97473

File tree

17 files changed

+3252
-0
lines changed

17 files changed

+3252
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"Name": "ElectricPotentialChangeRate",
3+
"BaseUnit": "VoltPerSecond",
4+
"XmlDoc": "ElectricPotential change rate is the ratio of the electric potential change to the time during which the change occurred (value of electric potential changes per unit time).",
5+
"BaseDimensions": {
6+
"L": 2,
7+
"M": 1,
8+
"T": -4,
9+
"I": -1
10+
},
11+
"Units": [
12+
{
13+
"SingularName": "VoltPerSecond",
14+
"PluralName": "VoltsPerSeconds",
15+
"BaseUnits": {
16+
"L": "Meter",
17+
"M": "Kilogram",
18+
"T": "Second",
19+
"I": "Ampere"
20+
},
21+
"FromUnitToBaseFunc": "x",
22+
"FromBaseToUnitFunc": "x",
23+
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
24+
"Localization": [
25+
{
26+
"Culture": "en-US",
27+
"Abbreviations": [ "V/s" ]
28+
}
29+
]
30+
},
31+
{
32+
"SingularName": "VoltPerMicrosecond",
33+
"PluralName": "VoltsPerMicroseconds",
34+
"BaseUnits": {
35+
"L": "Meter",
36+
"M": "Kilogram",
37+
"T": "Microsecond",
38+
"I": "Ampere"
39+
},
40+
"FromUnitToBaseFunc": "x*1E6",
41+
"FromBaseToUnitFunc": "x/1E6",
42+
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
43+
"Localization": [
44+
{
45+
"Culture": "en-US",
46+
"Abbreviations": [ "V/μs" ]
47+
}
48+
]
49+
},
50+
{
51+
"SingularName": "VoltPerMinute",
52+
"PluralName": "VoltsPerMinutes",
53+
"BaseUnits": {
54+
"L": "Meter",
55+
"M": "Kilogram",
56+
"T": "Minute",
57+
"I": "Ampere"
58+
},
59+
"FromUnitToBaseFunc": "x/60",
60+
"FromBaseToUnitFunc": "x*60",
61+
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
62+
"Localization": [
63+
{
64+
"Culture": "en-US",
65+
"Abbreviations": [ "V/min" ]
66+
}
67+
]
68+
},
69+
{
70+
"SingularName": "VoltPerHour",
71+
"PluralName": "VoltsPerHours",
72+
"BaseUnits": {
73+
"L": "Meter",
74+
"M": "Kilogram",
75+
"T": "Hour",
76+
"I": "Ampere"
77+
},
78+
"FromUnitToBaseFunc": "x/3600",
79+
"FromBaseToUnitFunc": "x*3600",
80+
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
81+
"Localization": [
82+
{
83+
"Culture": "en-US",
84+
"Abbreviations": [ "V/h" ]
85+
}
86+
]
87+
}
88+
]
89+
}

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

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialChangeRateExtensions.g.cs

Lines changed: 110 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by \generate-code.bat.
4+
//
5+
// Changes to this file will be lost when the code is regenerated.
6+
// The build server regenerates the code before each build and a pre-build
7+
// step will regenerate the code on each local build.
8+
//
9+
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
10+
//
11+
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
12+
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
13+
//
14+
// </auto-generated>
15+
//------------------------------------------------------------------------------
16+
17+
// Licensed under MIT No Attribution, see LICENSE file at the root.
18+
// Copyright 2013 Andreas Gullberg Larsen ([email protected]). Maintained at https://github.com/angularsen/UnitsNet.
19+
20+
using System;
21+
22+
namespace UnitsNet.Tests.CustomCode
23+
{
24+
public class ElectricPotentialChangeRateTests : ElectricPotentialChangeRateTestsBase
25+
{
26+
protected override double KilovoltsPerHoursInOneVoltPerSecond => 3.6;
27+
protected override double KilovoltsPerMicrosecondsInOneVoltPerSecond => 1e-09;
28+
protected override double KilovoltsPerMinutesInOneVoltPerSecond => 6e-2;
29+
protected override double KilovoltsPerSecondsInOneVoltPerSecond => 0.001;
30+
protected override double MegavoltsPerHoursInOneVoltPerSecond => 3.6e-3;
31+
protected override double MegavoltsPerMicrosecondsInOneVoltPerSecond => 1e-12;
32+
protected override double MegavoltsPerMinutesInOneVoltPerSecond => 6e-05;
33+
protected override double MegavoltsPerSecondsInOneVoltPerSecond => 1e-06;
34+
protected override double MicrovoltsPerHoursInOneVoltPerSecond => 3.6e9;
35+
protected override double MicrovoltsPerMicrosecondsInOneVoltPerSecond => 1;
36+
protected override double MicrovoltsPerMinutesInOneVoltPerSecond => 6e7;
37+
protected override double MicrovoltsPerSecondsInOneVoltPerSecond => 1e6;
38+
protected override double MillivoltsPerHoursInOneVoltPerSecond => 3.6e6;
39+
protected override double MillivoltsPerMicrosecondsInOneVoltPerSecond => 0.001;
40+
protected override double MillivoltsPerMinutesInOneVoltPerSecond => 6e4;
41+
protected override double MillivoltsPerSecondsInOneVoltPerSecond => 1000;
42+
protected override double VoltsPerHoursInOneVoltPerSecond => 3600;
43+
protected override double VoltsPerMicrosecondsInOneVoltPerSecond => 1e-06;
44+
protected override double VoltsPerMinutesInOneVoltPerSecond => 60;
45+
protected override double VoltsPerSecondsInOneVoltPerSecond => 1;
46+
}
47+
}

UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs

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