summaryrefslogtreecommitdiffstats
path: root/external/include/glm/detail/type_half.inl
diff options
context:
space:
mode:
Diffstat (limited to 'external/include/glm/detail/type_half.inl')
-rw-r--r--external/include/glm/detail/type_half.inl22
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.
//