We have a usable fminf now.
This commit is contained in:
Camilla Löwy 2018-12-26 14:59:51 +01:00
parent a533c9b3ca
commit 3201eedc34

View File

@ -450,10 +450,8 @@ GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma)
value = i / 255.f; value = i / 255.f;
// Apply gamma curve // Apply gamma curve
value = powf(value, 1.f / gamma) * 65535.f + 0.5f; value = powf(value, 1.f / gamma) * 65535.f + 0.5f;
// Clamp to value range // Clamp to value range
if (value > 65535.f) value = _glfw_fminf(value, 65535.f);
value = 65535.f;
values[i] = (unsigned short) value; values[i] = (unsigned short) value;
} }