Minor code formatting adjustments

This commit is contained in:
Jack Andersen 2017-12-02 20:09:34 -10:00
parent 89233e98b5
commit 2f4d0e7541
1 changed files with 4 additions and 4 deletions

View File

@ -81,18 +81,18 @@ static inline T clamp(T a, T val, T b)
template <typename T> template <typename T>
inline T ClampFull(float in) inline T ClampFull(float in)
{ {
if(std::is_floating_point<T>()) if (std::is_floating_point<T>())
{ {
return std::min<T>(std::max<T>(in, -1.0), 1.0); return std::min<T>(std::max<T>(in, -1.f), 1.f);
} }
else else
{ {
constexpr T MAX = std::numeric_limits<T>::max(); constexpr T MAX = std::numeric_limits<T>::max();
constexpr T MIN = std::numeric_limits<T>::min(); constexpr T MIN = std::numeric_limits<T>::min();
if(in < MIN) if (in < MIN)
return MIN; return MIN;
else if(in > MAX) else if (in > MAX)
return MAX; return MAX;
else else
return in; return in;