-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add KinematicViscosity scientific unit #611
Add KinematicViscosity scientific unit #611
Conversation
…nd Time convertToKinematicViscosity operators
scientific/src/commonMain/kotlin/converter/area/convertFromKinematicViscosityAndTime.kt
Show resolved
Hide resolved
scientific/src/commonTest/kotlin/unit/KinematicViscosityTest.kt
Outdated
Show resolved
Hide resolved
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'd like to see more contextual info in tests in any form that you see fit for the purpose
Not really related to this pr but imo interesting nonetheless: With time it's simple (thank god French idea of dividing the Day into 100 hours with 100 minutes each didn't stick in metric system) but what would be the correct answer for: Imperial unit / Metric unit = some Imperial/Metric derived unit Should the result be in Imperial or Metric systems? |
I'm adding @avdyushin as a second reviewer as he, afaik, also was adding some scientific units sometime ago |
This is a good question which i did to myself as well and i counter-questioned myself with "Should we ever reach that point? And if we do something about this would it be correct?" |
…c-unit * develop: (37 commits) Roll back package name Update api Added ticket and google API changes refs in comments Fixed comments Fixed comments Code cleanup Reversed to deprecated code as it seems to work for now fixed capturing parameters for 4 param method Remove require Update API discoverBondedDevices added to settings Return filter itself if no service UUIDs available Unwrap nullable list Provide serviceUUIDs into PairedAdvertisementData Update API Lint Fix incorrect empty identifier in Android mock Simplify test Fix hang test Update Bluetooth.kt ...
There's usually multiple operations for the same quantity to account for this. So we have an imperial / imperial = imperal. And often also a CGS unit / CGS unit -> CGS unit (which is already metric, just not the si unit). However, for unspecified combinations (e.g. Imperial / Metric) we will always default to the SI unit |
scientific/src/commonMain/kotlin/converter/area/convertToTime.kt
Outdated
Show resolved
Hide resolved
scientific/src/commonMain/kotlin/converter/area/convertToKinematicViscosity.kt
Show resolved
Hide resolved
scientific/src/commonMain/kotlin/converter/kinematicViscosity/convertToTime.kt
Outdated
Show resolved
Hide resolved
scientific/src/commonMain/kotlin/unit/KinematicViscosityUnit.kt
Outdated
Show resolved
Hide resolved
scientific/src/commonMain/kotlin/unit/KinematicViscosityUnit.kt
Outdated
Show resolved
Hide resolved
scientific/src/commonTest/kotlin/unit/KinematicViscosityTest.kt
Outdated
Show resolved
Hide resolved
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.
Conversion is wrong, as well as some operators
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.
LGTM
#593
This PR adds the KinematicViscosity scientific unit.
https://en.wikipedia.org/wiki/Viscosity#Kinematic_viscosity
Important: Due to a known issue(#453) the converters below are not implemented
KinematicViscosity -> Time
Time -> KinematicViscosity