mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
make clamp use TypeIdentityType so the min and max values dont participate in type deduction
This commit is contained in:
parent
077ead1428
commit
4ba0b7d58d
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ namespace geode {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr const T& clamp(const T& value, const T& minValue, const T& maxValue) {
|
||||
constexpr const T& clamp(const T& value, const TypeIdentityType<T>& minValue, const TypeIdentityType<T>& maxValue) {
|
||||
return value < minValue ? minValue : maxValue < value ? maxValue : value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue