-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
2,485 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"Name": "TemperatureGradient", | ||
"BaseUnit": "KelvinPerMeter", | ||
"XmlDoc": "The rate of change of temperature with displacement in a given direction (as with increase of height)", | ||
"BaseDimensions": { | ||
"L": -1, | ||
"Θ": 1 | ||
}, | ||
"Units": [ | ||
{ | ||
"SingularName": "KelvinPerMeter", | ||
"PluralName": "KelvinsPerMeter", | ||
"BaseUnits": { | ||
"L": "Meter", | ||
"Θ": "Kelvin" | ||
}, | ||
"FromUnitToBaseFunc": "x", | ||
"FromBaseToUnitFunc": "x", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "∆°K/m" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "DegreeCelsiusPerMeter", | ||
"PluralName": "DegreesCelciusPerMeter", | ||
"BaseUnits": { | ||
"L": "Meter", | ||
"Θ": "DegreeCelsius" | ||
}, | ||
"FromUnitToBaseFunc": "x", | ||
"FromBaseToUnitFunc": "x", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "∆°C/m" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "DegreeFahrenheitPerFoot", | ||
"PluralName": "DegreesFahrenheitPerFoot", | ||
"BaseUnits": { | ||
"L": "Foot", | ||
"Θ": "DegreeFahrenheit" | ||
}, | ||
"FromUnitToBaseFunc": "(x / 0.3048) * 5/9", | ||
"FromBaseToUnitFunc": "(x * 0.3048) * 9/5", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "∆°F/ft" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "DegreeCelsiusPerKilometer", | ||
"PluralName": "DegreesCelciusPerKilometer", | ||
"BaseUnits": { | ||
"L": "Kilometer", | ||
"Θ": "DegreeCelsius" | ||
}, | ||
"FromUnitToBaseFunc": "x / 1e3", | ||
"FromBaseToUnitFunc": "x * 1e3", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "∆°C/km" ] | ||
} | ||
] | ||
} | ||
] | ||
} |
44 changes: 44 additions & 0 deletions
44
UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTemperatureGradientExtensionsTest.g.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureGradientExtensions.g.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//------------------------------------------------------------------------------ | ||
// <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 TemperatureGradientTests : TemperatureGradientTestsBase | ||
{ | ||
protected override bool SupportsSIUnitSystem => true; | ||
|
||
protected override double DegreesCelciusPerKilometerInOneKelvinPerMeter => 1000; | ||
|
||
protected override double DegreesCelciusPerMeterInOneKelvinPerMeter => 1; | ||
|
||
protected override double DegreesFahrenheitPerFootInOneKelvinPerMeter => 0.54864; | ||
|
||
protected override double KelvinsPerMeterInOneKelvinPerMeter => 1; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.