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

floor with degrees (NoUnits) and digits fails due to method ambiguity #469

Closed
JeffFessler opened this issue Jul 17, 2021 · 0 comments · Fixed by #626
Closed

floor with degrees (NoUnits) and digits fails due to method ambiguity #469

JeffFessler opened this issue Jul 17, 2021 · 0 comments · Fixed by #626
Labels
dimensionless dimensionless quantities/units (mm/m, rad, …) and their interaction with plain numbers

Comments

@JeffFessler
Copy link
Contributor

MWE:

using Unitful: mm, °

x = 3.001mm
floor(typeof(x), x, digits=2) # works

a = 3.001°
floor(typeof(a), a, digits=2) # fails due to method ambiguity

Presumably because degrees are the NoUnits flavor.
This one is pretty opaque to me so I'm not sure where to begin for PR.

Perhaps related to #326?
In fact I suspect that if #328 were merged then I probably would just use floor(a, digits=2) for my use case (matching how non-unit values work), so it would be great to bump that one!

@sostock sostock added the dimensionless dimensionless quantities/units (mm/m, rad, …) and their interaction with plain numbers label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dimensionless dimensionless quantities/units (mm/m, rad, …) and their interaction with plain numbers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants