Skip to content
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

Implement max and min functions for primitive types that have them #83

Open
quentinmit opened this issue Jul 8, 2022 · 1 comment
Open

Comments

@quentinmit
Copy link
Contributor

f32, f64, etc. have functions called max and min that are defined to return the higher/lower non-NaN number. AFAICT it's not possible to actually call them on unit types without manually unpacking with either .value_raw or creating a dimensionless quantity and derefing. Please consider adding max and min functions on the unit types if the primitive type has them.

@v-morlock
Copy link

It would be great to also implement sin / cos / ... to make calculations with units easier. Right now, we have to do a lot of manual unpacking to do any meaningful calculations with units..

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

No branches or pull requests

2 participants