diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-21 17:40:38 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-21 17:40:38 +0200 |
commit | 2877f4eda3d1b0c7431039e3142ecf1a282a34b1 (patch) | |
tree | 58ad35e27ab2a3b8955f5adbf28f296670681ffc /external/include/glm/detail/type_half.inl | |
parent | Smooth sun movement (diff) | |
download | AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.gz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.bz2 AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.lz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.xz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.zst AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.zip |
Diffstat (limited to '')
-rw-r--r-- | external/include/glm/detail/type_half.inl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/external/include/glm/detail/type_half.inl b/external/include/glm/detail/type_half.inl index 78d3e26..29e8160 100644 --- a/external/include/glm/detail/type_half.inl +++ b/external/include/glm/detail/type_half.inl @@ -8,7 +8,7 @@ namespace detail { volatile float f = 1e10; - for(int i = 0; i < 10; ++i) + for(int i = 0; i < 10; ++i) f *= f; // this will overflow before the for loop terminates return f; } @@ -46,7 +46,7 @@ namespace detail // detail::uif32 result; - result.i = (unsigned int)(s << 31); + result.i = static_cast<unsigned int>(s << 31); return result.f; } else @@ -74,7 +74,7 @@ namespace detail // uif32 result; - result.i = (unsigned int)((s << 31) | 0x7f800000); + result.i = static_cast<unsigned int>((s << 31) | 0x7f800000); return result.f; } else @@ -84,7 +84,7 @@ namespace detail // uif32 result; - result.i = (unsigned int)((s << 31) | 0x7f800000 | (m << 13)); + result.i = static_cast<unsigned int>((s << 31) | 0x7f800000 | (m << 13)); return result.f; } } @@ -101,15 +101,15 @@ namespace detail // uif32 Result; - Result.i = (unsigned int)((s << 31) | (e << 23) | m); + Result.i = static_cast<unsigned int>((s << 31) | (e << 23) | m); return Result.f; } - GLM_FUNC_QUALIFIER hdata toFloat16(float const & f) + GLM_FUNC_QUALIFIER hdata toFloat16(float const& f) { uif32 Entry; Entry.f = f; - int i = (int)Entry.i; + int i = static_cast<int>(Entry.i); // // Our floating point number, f, is represented by the bit @@ -149,7 +149,7 @@ namespace detail // whose magnitude is less than __half_NRM_MIN. // // We convert f to a denormalized half. - // + // m = (m | 0x00800000) >> (1 - e); @@ -160,9 +160,9 @@ namespace detail // our number normalized. Because of the way a half's bits // are laid out, we don't have to treat this case separately; // the code below will handle it correctly. - // + // - if(m & 0x00001000) + if(m & 0x00001000) m += 0x00002000; // @@ -188,7 +188,7 @@ namespace detail // F is a NAN; we produce a half NAN that preserves // the sign bit and the 10 leftmost bits of the // significand of f, with one exception: If the 10 - // leftmost bits are all zero, the NAN would turn + // leftmost bits are all zero, the NAN would turn // into an infinity, so we have to set at least one // bit in the significand. // |