16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 22:59:18 +02:00

Replace clamp with std::clamp

This commit is contained in:
docentYT
2026-05-01 22:14:29 +02:00
parent 1bdd000443
commit d1f16411a1
36 changed files with 271 additions and 287 deletions

View File

@@ -308,7 +308,7 @@ void scenarioloader_ui::generate_gradient_tex()
image_data[(y * image_width + x) * 4] = 0;
image_data[(y * image_width + x) * 4 + 1] = 0;
image_data[(y * image_width + x) * 4 + 2] = 0;
image_data[(y * image_width + x) * 4 + 3] = clamp(static_cast<int>(pow(y / 255.f, 0.7) * 255), 0, 255);
image_data[(y * image_width + x) * 4 + 3] = std::clamp(static_cast<int>(pow(y / 255.f, 0.7) * 255), 0, 255);
}
// Create a OpenGL texture identifier