Closed mlms13 closed 1 year ago
Currently we have a clamp function for everything that implements Ord that clamps both lower and upper bounds. It would be helpful to have an easy way to do something like myNumber |> Float.clampLower(0.0). Maybe clamp isn't the right name for this?
clamp
Ord
myNumber |> Float.clampLower(0.0)
Wait. clampLower is just max, right?
clampLower
max
Currently we have a
clamp
function for everything that implementsOrd
that clamps both lower and upper bounds. It would be helpful to have an easy way to do something likemyNumber |> Float.clampLower(0.0)
. Maybeclamp
isn't the right name for this?