-
Notifications
You must be signed in to change notification settings - Fork 382
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
Feature: Add LapseRate extensions #324
Feature: Add LapseRate extensions #324
Conversation
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.
Welcome and thanks for the contribution. I couldn't find any errors but let's wait for @angularsen for merging.
What are your gut feelings about the And similar, how about conversions to LapseRate? I think For consistency I could imagine we wanted to either only use Any preferences on whether |
If I understand correctly, I think
In hindsight, LapseRate abbreviation should probably be changed to reflect this? It is currently missing the delta symbol. But not sure if this goes against the convention in the domain.
I would say TemperatureDelta, because it is the leading quantity. |
return Length.FromKilometers(left.KelvinsDelta / right.DegreesCelciusPerKilometer); | ||
} | ||
|
||
public static Length operator /(Temperature left, LapseRate right) |
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.
I vote to drop this.
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.
If this is removed, I think this PR is good to go.
Thanks for the review.
Regarding the abbreviation:
|
@jnyrup About missing k, yeah I did implement that and when I changed base unit forgot to change the abbreviation also, my bad. And yeah, we should change the abbreviation to |
And related, why do we use ▲ instead of ∆? |
I'm not aware of a specific reason for using ▲. I used ▲ because @angularsen used it in his comment above. Let's wait for his answer. |
No preference for me other than it already being used for TemperatureDelta, I suppose ∆ is more correct. |
Hmm, then I'm opening an issue for replacing every occurrence of ▲ with ∆ in the library, for the sake of consistency. I also see some minor differences in code-style in various places (talking in general, not about this p.r.). Perhaps we can set a standard on this and write it to the wiki. Standards make contributing less confusing and reviewing less difficult, I believe. |
That would be good! And maybe adding it as a contribution guideline so it pops up whenever someone creates a new issue / PR. |
I've updated the PR so the unit of lapse rate is now |
I thought that was the job of #327? |
Sure, but if you are already modifying the abbreviation here, why not use the correct symbol to begin with? |
The PR has been updated with the correct delta symbol. |
Thanks! Nuget 3.81 is out. |
This PR extends LapseRate with four operator overloads: