View source
this follows std::clamp for argument order, as opposed to qBound which uses (min, value, max)