Remove a helper; no clamping for normalizePercent
This commit is contained in:
parent
04779965b8
commit
ccbcf4a4c7
1 changed files with 1 additions and 14 deletions
|
|
@ -71,7 +71,7 @@ constexpr float normalizeVelocity(T velocity)
|
|||
template<class T>
|
||||
constexpr float normalizePercents(T percentValue)
|
||||
{
|
||||
return std::min(std::max(static_cast<float>(percentValue), 0.0f), 100.0f) / 100.0f;
|
||||
return percentValue * 0.01f;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -86,19 +86,6 @@ constexpr float normalizeBend(float bendValue)
|
|||
return std::min(std::max(bendValue, -8191.0f), 8191.0f) / 8191.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Normalize a possibly negative percentage between -1 and 1
|
||||
*
|
||||
* @tparam T
|
||||
* @param percentValue
|
||||
* @return constexpr float
|
||||
*/
|
||||
template<class T>
|
||||
constexpr float normalizeNegativePercents(T percentValue)
|
||||
{
|
||||
return std::min(std::max(static_cast<float>(percentValue), -100.0f), 100.0f) / 100.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief If a cc switch exists for the value, returns the value with the CC modifier, otherwise returns the value alone.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue