How are functions in the
Float trait intended to be used?
I would like to be able to do something like
max(a,b) (like with
std::cmp::max). Are there plans to add free functions as wrappers around the methods defined in
Second question: would there be interest in adding a
clamp(x, lb, ub) method (essentially just
min(max(x, lb), ub))? There are quite a number of times I’ve wanted this for floats.