Browse Source

Math: no need to have two versions of denormalize(), they are the same.

Overlooked in cade175304.
pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
bdba6b7221
  1. 5
      src/Math/Functions.h

5
src/Math/Functions.h

@ -129,10 +129,7 @@ integral type.
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class Integral, class FloatingPoint> inline constexpr typename Integral denormalize(FloatingPoint value);
#else
template<class Integral, class FloatingPoint> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value && std::is_unsigned<Integral>::value, Integral>::type denormalize(FloatingPoint value) {
return value*std::numeric_limits<Integral>::max();
}
template<class Integral, class FloatingPoint> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value && std::is_signed<Integral>::value, Integral>::type denormalize(FloatingPoint value) {
template<class Integral, class FloatingPoint> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value, Integral>::type denormalize(FloatingPoint value) {
return value*std::numeric_limits<Integral>::max();
}
#endif

Loading…
Cancel
Save