Skip to content

Commit 6eaea5a

Browse files
authored
Add quantity LinearPowerDensity (#768)
1 parent 39d8bab commit 6eaea5a

File tree

17 files changed

+3571
-0
lines changed

17 files changed

+3571
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"Name": "LinearPowerDensity",
3+
"BaseUnit": "WattPerMeter",
4+
"XmlDoc": "The Linear Power Density of a substance is its power per unit length. The term linear density is most often used when describing the characteristics of one-dimensional objects, although linear density can also be used to describe the density of a three-dimensional quantity along one particular dimension.",
5+
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Linear_density",
6+
"BaseDimensions": {
7+
"M": 1,
8+
"L": 1,
9+
"T": -3
10+
},
11+
"Units": [
12+
{
13+
"SingularName": "WattPerMeter",
14+
"PluralName": "WattsPerMeter",
15+
"FromUnitToBaseFunc": "x",
16+
"FromBaseToUnitFunc": "x",
17+
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
18+
"Localization": [
19+
{
20+
"Culture": "en-US",
21+
"Abbreviations": [ "W/m" ]
22+
}
23+
]
24+
},
25+
{
26+
"SingularName": "WattPerCentimeter",
27+
"PluralName": "WattsPerCentimeter",
28+
"FromUnitToBaseFunc": "x*1e2",
29+
"FromBaseToUnitFunc": "x/1e2",
30+
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
31+
"Localization": [
32+
{
33+
"Culture": "en-US",
34+
"Abbreviations": [ "W/cm" ]
35+
}
36+
]
37+
},
38+
{
39+
"SingularName": "WattPerMillimeter",
40+
"PluralName": "WattsPerMillimeter",
41+
"FromUnitToBaseFunc": "x*1e3",
42+
"FromBaseToUnitFunc": "x/1e3",
43+
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
44+
"Localization": [
45+
{
46+
"Culture": "en-US",
47+
"Abbreviations": [ "W/mm" ]
48+
}
49+
]
50+
},
51+
{
52+
"SingularName": "WattPerInch",
53+
"PluralName": "WattsPerInch",
54+
"FromUnitToBaseFunc": "x*39.37007874",
55+
"FromBaseToUnitFunc": "x/39.37007874",
56+
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
57+
"Localization": [
58+
{
59+
"Culture": "en-US",
60+
"Abbreviations": [ "W/in" ]
61+
}
62+
]
63+
},
64+
{
65+
"SingularName": "WattPerFoot",
66+
"PluralName": "WattsPerFoot",
67+
"FromUnitToBaseFunc": "x*3.280839895",
68+
"FromBaseToUnitFunc": "x/3.280839895",
69+
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
70+
"Localization": [
71+
{
72+
"Culture": "en-US",
73+
"Abbreviations": [ "W/ft" ]
74+
}
75+
]
76+
}
77+
]
78+
}

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

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearPowerDensityExtensions.g.cs

Lines changed: 130 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 LinearPowerDensityTests : LinearPowerDensityTestsBase
25+
{
26+
protected override double GigawattsPerCentimeterInOneWattPerMeter => 1e-11;
27+
protected override double GigawattsPerFootInOneWattPerMeter => 3.0480e-10;
28+
protected override double GigawattsPerInchInOneWattPerMeter => 2.5400e-11;
29+
protected override double GigawattsPerMeterInOneWattPerMeter => 1e-9;
30+
protected override double GigawattsPerMillimeterInOneWattPerMeter => 1e-12;
31+
32+
protected override double MegawattsPerCentimeterInOneWattPerMeter => 1e-8;
33+
protected override double MegawattsPerFootInOneWattPerMeter => 3.0480e-7;
34+
protected override double MegawattsPerInchInOneWattPerMeter => 2.5400e-8;
35+
protected override double MegawattsPerMeterInOneWattPerMeter => 1e-6;
36+
protected override double MegawattsPerMillimeterInOneWattPerMeter => 1e-9;
37+
38+
protected override double KilowattsPerCentimeterInOneWattPerMeter => 1e-5;
39+
protected override double KilowattsPerFootInOneWattPerMeter => 3.0480e-4;
40+
protected override double KilowattsPerInchInOneWattPerMeter => 2.5400e-5;
41+
protected override double KilowattsPerMeterInOneWattPerMeter => 1e-3;
42+
protected override double KilowattsPerMillimeterInOneWattPerMeter => 1e-6;
43+
44+
protected override double WattsPerCentimeterInOneWattPerMeter => 1e-2;
45+
protected override double WattsPerFootInOneWattPerMeter => 3.0480e-1;
46+
protected override double WattsPerInchInOneWattPerMeter => 2.5400e-2;
47+
protected override double WattsPerMeterInOneWattPerMeter => 1;
48+
protected override double WattsPerMillimeterInOneWattPerMeter => 1e-3;
49+
50+
protected override double MilliwattsPerCentimeterInOneWattPerMeter => 1e1;
51+
protected override double MilliwattsPerFootInOneWattPerMeter => 3.0480e2;
52+
protected override double MilliwattsPerInchInOneWattPerMeter => 2.5400e1;
53+
protected override double MilliwattsPerMeterInOneWattPerMeter => 1e3;
54+
protected override double MilliwattsPerMillimeterInOneWattPerMeter => 1;
55+
}
56+
}

0 commit comments

Comments
 (0)