diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-03-24 21:20:09 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-03-24 21:20:09 +0100 |
| commit | c929c3ebc1b4a21447d3833b65288ca0244f03d8 (patch) | |
| tree | 60789e552ec77cd8095ac825f777a2f15faa902a /Source/Core/Common/MathUtil.cpp | |
| parent | 4aba4332966d86904129b0109e36c75b10fb72f3 (diff) | |
| parent | e0baed850fcf75c6920e41f627fb06048a85985a (diff) | |
Merge pull request #202 from Tilka/mathutil
MathUtil: add IntFloat/IntDouble constructors and test FlushToZero()
Diffstat (limited to 'Source/Core/Common/MathUtil.cpp')
| -rw-r--r-- | Source/Core/Common/MathUtil.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/Common/MathUtil.cpp b/Source/Core/Common/MathUtil.cpp index eaff3f40ff..c7437cf533 100644 --- a/Source/Core/Common/MathUtil.cpp +++ b/Source/Core/Common/MathUtil.cpp @@ -15,8 +15,7 @@ namespace MathUtil u32 ClassifyDouble(double dvalue) { // TODO: Optimize the below to be as fast as possible. - IntDouble value; - value.d = dvalue; + IntDouble value(dvalue); u64 sign = value.i & DOUBLE_SIGN; u64 exp = value.i & DOUBLE_EXP; if (exp > DOUBLE_ZERO && exp < DOUBLE_EXP) @@ -55,8 +54,7 @@ u32 ClassifyDouble(double dvalue) u32 ClassifyFloat(float fvalue) { // TODO: Optimize the below to be as fast as possible. - IntFloat value; - value.f = fvalue; + IntFloat value(fvalue); u32 sign = value.i & FLOAT_SIGN; u32 exp = value.i & FLOAT_EXP; if (exp > FLOAT_ZERO && exp < FLOAT_EXP) |
