You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f64 and f32 implement clamp manually (which makes sense, as they aren't Ord - though I'm unsure why clamp couldn't have been implemented in PartialOrd given that it only uses PartialOrd comparisons, oh well) f64::clamp f32::clamp
Could clamp (and maybe similar methods) be implemented for f64 Quantities? This would be used widely throughout my code, where I otherwise have doubled-up min/max calls.
The text was updated successfully, but these errors were encountered:
Recently tried to use
clamp
on an f64 quantity, but ran into this issue:Quantity::clamp
is only implemented via theOrd
trait:impl Ord for Quantity
f64 and f32 implement
clamp
manually (which makes sense, as they aren'tOrd
- though I'm unsure whyclamp
couldn't have been implemented inPartialOrd
given that it only usesPartialOrd
comparisons, oh well)f64::clamp
f32::clamp
Could clamp (and maybe similar methods) be implemented for f64 Quantities? This would be used widely throughout my code, where I otherwise have doubled-up min/max calls.
The text was updated successfully, but these errors were encountered: