summaryrefslogtreecommitdiff
path: root/Source/Core/Common/MathUtil.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-03-23 10:24:06 +0100
committerTillmann Karras <tilkax@gmail.com>2014-03-24 16:14:22 +0100
commitaf525266d4d0667fe1a6be589e0a83131a829783 (patch)
treefd9011577680202c396dd235763846d3d1194fed /Source/Core/Common/MathUtil.cpp
parent9849129b5d3fef5caa308c5ee1adebc2e07cc39d (diff)
MathUtil: add constructors to IntFloat/IntDouble
Diffstat (limited to 'Source/Core/Common/MathUtil.cpp')
-rw-r--r--Source/Core/Common/MathUtil.cpp6
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)