mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Replace (std::min + std::max) with std::clamp
This commit is contained in:
parent
caea24f6ea
commit
163dc9618a
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "audio/audio_engine.hpp"
|
||||
#include "pipeline/asset_manager.hpp"
|
||||
#include "core/logger.hpp"
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
namespace wowee {
|
||||
|
|
@ -180,7 +181,7 @@ void SpellSoundManager::playRandomSound(const std::vector<SpellSample>& library,
|
|||
}
|
||||
|
||||
void SpellSoundManager::setVolumeScale(float scale) {
|
||||
volumeScale_ = std::max(0.0f, std::min(1.0f, scale));
|
||||
volumeScale_ = std::clamp(scale, .0f, 1.f);
|
||||
}
|
||||
|
||||
void SpellSoundManager::playPrecast(MagicSchool school, SpellPower power) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue