Skip to content

Conversation

Chippychap
Copy link
Contributor

@Chippychap Chippychap commented Nov 22, 2021

Fixes #989

I added the additional calculation operators for ForceChangeRate, as agreed in #989.
Additionally, I added the appropriate unit tests.

I noticed some differences between creating the new unit in various other operators, where some use the FromXxx(value) static factory methods and others use the constructors directly.
I used the constructors directly to reduce method calls, but I am wondering what is preferred.

@angularsen
Copy link
Owner

I used the constructors directly to reduce method calls, but I am wondering what is preferred.

Doesn't really matter, we have tons of tests on both ctors and factory methods so these tests should focus on the operator overloads.

@angularsen
Copy link
Owner

Sorry, my bad, I read wrong and thought you meant in the tests.
Yes, using ctors in the implementations is preferred as it reduces the call chain 👍

@angularsen angularsen changed the title Add ForceChangeRate calculation operators (#989) Add ForceChangeRate arithmetic operators (#989) Nov 22, 2021
@angularsen angularsen changed the title Add ForceChangeRate arithmetic operators (#989) Add ForceChangeRate arithmetic operators Nov 22, 2021
@angularsen angularsen merged commit 694d786 into angularsen:master Nov 22, 2021
@angularsen
Copy link
Owner

Great work, looked perfect to me 🙌

@angularsen
Copy link
Owner

Nuget should be out shortly

Release UnitsNet/4.105.0 · angularsen/UnitsNet

@Chippychap Chippychap deleted the add-forcechangerate-operators branch November 22, 2021 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ForceChangeRate calculation operators
2 participants