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 clamp #376

Closed
jacg opened this issue Sep 21, 2022 · 2 comments
Closed

Implement clamp #376

jacg opened this issue Sep 21, 2022 · 2 comments

Comments

@jacg
Copy link
Contributor

jacg commented Sep 21, 2022

It would be useful to have uom support clamp.

My attempt at implementing it ran into problems caused by there being different definitions for

  • {std,core}::cmp::Ord::clamp
  • {f32,f64}::clamp

and my not knowing how to treat these separately inside uom's implementation.

@iliekturtles
Copy link
Owner

Closing this as a duplicate of #239.

  • Want to open a draft PR with the code you trying?
  • That issue discusses MSRV issues. At this point I'm inclined to bump to 1.50 with 1.64.0 coming out today.

@jacg
Copy link
Contributor Author

jacg commented Sep 23, 2022

Ah, sorry, I should have found #239.

Here's the draft PR: #377.

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