16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +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

@@ -457,7 +457,7 @@ void TAnimModel::RaAnimate( unsigned int const Framestamp ) {
else
opacity -= m_transition ? timedelta / transitionofftime : 1.f; // reduce to zero
// Clamp the opacity
opacity = clamp(opacity, 0.f, 1.f);
opacity = std::clamp(opacity, 0.f, 1.f);
}
// Ra 2F1I: to by można pomijać dla modeli bez animacji, których jest większość
@@ -600,7 +600,7 @@ std::optional<std::tuple<float, float, std::optional<glm::vec3>> > TAnimModel::L
void TAnimModel::SkinSet( int const Index, material_handle const Material ) {
m_materialdata.replacable_skins[ clamp( Index, 1, 4 ) ] = Material;
m_materialdata.replacable_skins[ std::clamp( Index, 1, 4 ) ] = Material;
}
void TAnimModel::AnimUpdate(double dt)