The max and min functions are used here to clamp the value of WIDTH and HEIGHT between the allowed minimum and maximum extents that are supported by the implementation.
Would it not be more idiomatic to use std::clamp in this case?
We've already established we're using C++17, so availability of the function shouldn't be an issue.
The clamp function is used here to clamp the value of WIDTH and HEIGHT between the allowed minimum and maximum extents that are supported by the implementation.
In the "Swap extent" section of https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
Would it not be more idiomatic to use
std::clamp
in this case? We've already established we're using C++17, so availability of the function shouldn't be an issue.Proposed code change:
Proposed wording change: