Daily bit(e) of C++ | std::clamp
The std::clamp is a simple C++17 algorithm that clamps a given value between the minimum and maximum thresholds.
If the value is outside the thresholds, the violated threshold is returned instead.
Thanks for reading Daily bit(e) of C++! Subscribe for free to receive new posts and support my work.
ncG1vNJzZmirmaK8r8DOrZ9nq6WXwLWtwqRlnKedZL1wsMCio7Jlkp7BpnnOn2ScZaOpsaS4wKan
Almeda Bohannan
Update: 2024-12-04