float_notmalize.inl 293 B

12345678910111213
  1. /// @ref gtx_float_normalize
  2. #include <limits>
  3. namespace glm
  4. {
  5. template<length_t L, typename T, qualifier Q>
  6. GLM_FUNC_QUALIFIER vec<L, float, Q> floatNormalize(vec<L, T, Q> const& v)
  7. {
  8. return vec<L, float, Q>(v) / static_cast<float>(std::numeric_limits<T>::max());
  9. }
  10. }//namespace glm