Common: Move floating-point utility functions to FloatUtils.h/.cpp

Keeps all of the floating-point utility functions in their own file to
keep them all together. This also provides a place for other
general-purpose floating-point functions to be added in the future,
which will be necessary when improving the flag-setting within the
interpreter.
This commit is contained in:
Lioncash 2018-05-07 01:18:41 -04:00
parent 756ef54ab6
commit 86018b503b
17 changed files with 474 additions and 434 deletions

View file

@ -11,7 +11,7 @@
#include <gtest/gtest.h> // NOLINT
#include "Common/Common.h"
#include "Common/MathUtil.h"
#include "Common/FloatUtils.h"
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/OpcodeDecoding.h"
@ -75,7 +75,7 @@ protected:
void ExpectOut(float val)
{
// Read unswapped.
MathUtil::IntFloat expected(val), actual(m_dst.Read<float, false>());
Common::IntFloat expected(val), actual(m_dst.Read<float, false>());
if (!actual.f || actual.f != actual.f)
EXPECT_EQ(expected.i, actual.i);
else