Skip to content

Commit

Permalink
Add KelvinPerMinute to TemperatureChangeRateUnit (#1429)
Browse files Browse the repository at this point in the history
- Add KelvinPerMinute to TemperatureChangeRateUnit
- Add "pause" at end of generate-code.bat so the cmd window does not
close immediately, allowing devs to inspect any errors that may have
occurred during the command execution.

Co-authored-by: Andrew Meservy <[email protected]>
  • Loading branch information
andrewmeservy and Andrew Meservy authored Oct 20, 2024
1 parent e080254 commit a926e5f
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 16 deletions.
13 changes: 13 additions & 0 deletions Common/UnitDefinitions/TemperatureChangeRate.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@
"Abbreviations": [ "°C/min" ]
}
]
},
{
"SingularName": "DegreeKelvinPerMinute",
"PluralName": "DegreesKelvinPerMinute",
"FromUnitToBaseFunc": "({x} / 60) - 273.15",
"FromBaseToUnitFunc": "({x} + 273.15) * 60",
"Prefixes": [],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "K/min" ]
}
]
}
]
}
3 changes: 2 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,8 @@
"KilodegreeCelsiusPerSecond": 7,
"MicrodegreeCelsiusPerSecond": 8,
"MillidegreeCelsiusPerSecond": 9,
"NanodegreeCelsiusPerSecond": 10
"NanodegreeCelsiusPerSecond": 10,
"DegreeKelvinPerMinute": 20
},
"TemperatureDelta": {
"DegreeCelsius": 1,
Expand Down

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.

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.

2 changes: 2 additions & 0 deletions UnitsNet.Tests/CustomCode/TemperatureChangeRateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class TemperatureChangeRateTests : TemperatureChangeRateTestsBase

protected override double DegreesCelsiusPerMinuteInOneDegreeCelsiusPerSecond => 60;

protected override double DegreesKelvinPerMinuteInOneDegreeCelsiusPerSecond => 16449;

[Fact]
public void TemperatureChangeRateMultipliedWithTimeSpanEqualsTemperatureDelta()
{
Expand Down
Loading

0 comments on commit a926e5f

Please sign in to comment.