-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix apparent typo in JavaDoc of Quantity #254
base: master
Are you sure you want to change the base?
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.
@vorburger Kelvin is wrong here.
The numeric value is indeed a little incorrect,
It should be 2°C + 1°C = 276.15°C
.
If you could fix that I'd be happy to merge the PR.
Wait, what? Is that a typo, or intentional? It doesn't make sense to me, like this... adding two quantities (2+1) of the same °C unit, becomes a 276.15°C, really? |
Yes, that's the whole point of Quantity.Scale. Check out the Indriya (RI) TemperatureTest As well as TemperatureDemo for Ask @desruisseaux for the motivation. |
Hello @vorburger
Yes, really at least in some cases for the particular case of °C. Actually it depends on whether 1°C is an absolute temperature or an increment. This is why there is a If 1°C is an increment ( So if you want 2°C + 1°C = 3°C, you need to tell the library that 1°C is an increment rather than an absolute measurement. This ambiguity exists for °C and not for other standard units (ignoring °F) because °C has a zero which is shifted compared to the base SI unit. For non-shifted units, the distinction between absolute and relative makes no difference, because the shift is zero. |
A few resources are below. We have to be careful with the answers of this kind of forum as they may sometime be questionable, but the high-ranked answers have good chances to be good resources: |
@vorburger Any chance you could fix this PR? As it's just a single digit, we could also close it and address the viable part of it separately. |
@keilw
This change is