-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed Delta suffix of TemperatureDelta units (Fixes #331). #339
Conversation
Fixed generate-code.bat to allow spaces in script path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, just a couple of things.
@@ -3,9 +3,106 @@ | |||
"BaseUnit": "KelvinDelta", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to Kelvin.
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "▲K" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -90,6 +193,7 @@ | |||
{ | |||
"SingularName": "DegreeRoemerDelta", | |||
"PluralName": "DegreesRoemerDelta", | |||
"ObsoleteText": "Deprecated due to github issue #180, please use DegreeRoemer instead", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice description!
@@ -1,3 +1,3 @@ | |||
@echo off | |||
SET scriptdir=%~dp0 | |||
powershell -ExecutionPolicy Bypass -NoProfile -File %scriptdir%UnitsNet\Scripts\GenerateUnits.ps1 | |||
powershell -ExecutionPolicy Bypass -NoProfile -File "%scriptdir%UnitsNet\Scripts\GenerateUnits.ps1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch.
protected override double DegreesRankineInOneKelvinDelta => 1.8; | ||
protected override double DegreesReaumurInOneKelvinDelta => 0.8; | ||
protected override double DegreesRoemerInOneKelvinDelta => 21 / 40d; | ||
protected override double KelvinsInOneKelvinDelta => 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When changing base unit to Kelvin as commented below and regenerating the code, then this test code must be updated too.
… the addition of new non-"Delta" units
Will address the comments, cheers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot.
@@ -94,7 +95,7 @@ public void MultiplyByTemperatureDeltaEqualsTemperature(TemperatureUnit unit, in | |||
public void TemperatureDeltaPlusTemperatureEqualsTemperature(TemperatureUnit unit, int deltaVal, int temperatureVal, string expected) | |||
{ | |||
Temperature temperature = Temperature.From(temperatureVal, unit); | |||
TemperatureDelta delta = TemperatureDelta.From(deltaVal, (TemperatureDeltaUnit) unit); | |||
TemperatureDelta delta = TemperatureDelta.From(deltaVal, (TemperatureDeltaUnit)Enum.Parse(typeof(TemperatureDeltaUnit), unit.ToString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
Nuget 3.84 on its way out |
Awesome! I’ll get cracking on the other issue when I get a second.
… On 10 Dec 2017, at 19:56, Andreas Gullberg Larsen ***@***.***> wrote:
Nuget 3.84 on its way out
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Fixed generate-code.bat to allow spaces in script path.