Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions Common/UnitDefinitions/LinearPowerDensity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"Name": "LinearPowerDensity",
"BaseUnit": "WattPerMeter",
"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.",
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Linear_density",
"BaseDimensions": {
"M": 1,
"L": 1,
"T": -3
},
"Units": [
{
"SingularName": "WattPerMeter",
"PluralName": "WattsPerMeter",
"FromUnitToBaseFunc": "x",
"FromBaseToUnitFunc": "x",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/m" ]
}
]
},
{
"SingularName": "WattPerCentimeter",
"PluralName": "WattsPerCentimeter",
"FromUnitToBaseFunc": "x*1e2",
"FromBaseToUnitFunc": "x/1e2",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/cm" ]
}
]
},
{
"SingularName": "WattPerMillimeter",
"PluralName": "WattsPerMillimeter",
"FromUnitToBaseFunc": "x*1e3",
"FromBaseToUnitFunc": "x/1e3",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/mm" ]
}
]
},
{
"SingularName": "WattPerInch",
"PluralName": "WattsPerInch",
"FromUnitToBaseFunc": "x*39.37007874",
"FromBaseToUnitFunc": "x/39.37007874",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/in" ]
}
]
},
{
"SingularName": "WattPerFoot",
"PluralName": "WattsPerFoot",
"FromUnitToBaseFunc": "x*3.280839895",
"FromBaseToUnitFunc": "x/3.280839895",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/ft" ]
}
]
}
]
}

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.

56 changes: 56 additions & 0 deletions UnitsNet.Tests/CustomCode/LinearPowerDensityTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by \generate-code.bat.
//
// Changes to this file will be lost when the code is regenerated.
// The build server regenerates the code before each build and a pre-build
// step will regenerate the code on each local build.
//
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------

// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;

namespace UnitsNet.Tests.CustomCode
{
public class LinearPowerDensityTests : LinearPowerDensityTestsBase
{
protected override double GigawattsPerCentimeterInOneWattPerMeter => 1e-11;
protected override double GigawattsPerFootInOneWattPerMeter => 3.0480e-10;
protected override double GigawattsPerInchInOneWattPerMeter => 2.5400e-11;
protected override double GigawattsPerMeterInOneWattPerMeter => 1e-9;
protected override double GigawattsPerMillimeterInOneWattPerMeter => 1e-12;

protected override double MegawattsPerCentimeterInOneWattPerMeter => 1e-8;
protected override double MegawattsPerFootInOneWattPerMeter => 3.0480e-7;
protected override double MegawattsPerInchInOneWattPerMeter => 2.5400e-8;
protected override double MegawattsPerMeterInOneWattPerMeter => 1e-6;
protected override double MegawattsPerMillimeterInOneWattPerMeter => 1e-9;

protected override double KilowattsPerCentimeterInOneWattPerMeter => 1e-5;
protected override double KilowattsPerFootInOneWattPerMeter => 3.0480e-4;
protected override double KilowattsPerInchInOneWattPerMeter => 2.5400e-5;
protected override double KilowattsPerMeterInOneWattPerMeter => 1e-3;
protected override double KilowattsPerMillimeterInOneWattPerMeter => 1e-6;

protected override double WattsPerCentimeterInOneWattPerMeter => 1e-2;
protected override double WattsPerFootInOneWattPerMeter => 3.0480e-1;
protected override double WattsPerInchInOneWattPerMeter => 2.5400e-2;
protected override double WattsPerMeterInOneWattPerMeter => 1;
protected override double WattsPerMillimeterInOneWattPerMeter => 1e-3;

protected override double MilliwattsPerCentimeterInOneWattPerMeter => 1e1;
protected override double MilliwattsPerFootInOneWattPerMeter => 3.0480e2;
protected override double MilliwattsPerInchInOneWattPerMeter => 2.5400e1;
protected override double MilliwattsPerMeterInOneWattPerMeter => 1e3;
protected override double MilliwattsPerMillimeterInOneWattPerMeter => 1;
}
}
Loading