mirror of https://github.com/AxioDL/boo.git
AudioMatrix/Submix: static_cast INT_MAX to float
This commit is contained in:
parent
89e4a18d0b
commit
7acefc6c60
|
@ -25,7 +25,7 @@ static inline int16_t Clamp16(float in) {
|
||||||
static inline int32_t Clamp32(float in) {
|
static inline int32_t Clamp32(float in) {
|
||||||
if (in < INT_MIN)
|
if (in < INT_MIN)
|
||||||
return INT_MIN;
|
return INT_MIN;
|
||||||
else if (in > INT_MAX)
|
else if (in > static_cast<float>(INT_MAX))
|
||||||
return INT_MAX;
|
return INT_MAX;
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ constexpr T ClampInt(float in) {
|
||||||
|
|
||||||
if (in < MIN)
|
if (in < MIN)
|
||||||
return MIN;
|
return MIN;
|
||||||
else if (in > MAX)
|
else if (in > static_cast<float>(MAX))
|
||||||
return MAX;
|
return MAX;
|
||||||
else
|
else
|
||||||
return in;
|
return in;
|
||||||
|
|
Loading…
Reference in New Issue