build: rename limit to clamp

This commit is contained in:
Danny Robson 2018-05-03 21:44:37 +10:00
parent 48c39ce7f6
commit 7f35915772

View File

@ -425,12 +425,12 @@ main (void)
VkSurfaceFormatKHR surface_format { VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR };
VkPresentModeKHR present_mode = VK_PRESENT_MODE_FIFO_KHR;
VkExtent2D present_extent {
.width = util::limit (
.width = util::clamp (
unsigned (resolution.w),
surface_capabilities.minImageExtent.width,
surface_capabilities.maxImageExtent.width
),
.height = util::limit (
.height = util::clamp (
unsigned (resolution.h),
surface_capabilities.minImageExtent.height,
surface_capabilities.maxImageExtent.height