Files
UnrealEngineUWP/Engine/Source/Programs/HeadlessChaos/Private/HeadlessChaosTestMath.cpp
michael lentine a560ca1682 Rename/move HeadlessChaos.
#rb none


#ROBOMERGE-OWNER: michael.lentine
#ROBOMERGE-AUTHOR: michael.lentine
#ROBOMERGE-SOURCE: CL 10942527 via CL 10942568 via CL 10942571 via CL 10942575
#ROBOMERGE-BOT: (v632-10940481)

[CL 10942576 by michael lentine in Main branch]
2020-01-10 12:41:31 -05:00

30 lines
575 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "HeadlessChaos.h"
#include "HeadlessChaosTestUtility.h"
#include "Chaos/Matrix.h"
#include "Chaos/Utilities.h"
namespace ChaosTest
{
using namespace Chaos;
TEST(MathTests, TestMatrixInverse)
{
FMath::RandInit(10695676);
const FReal Tolerance = (FReal)0.001;
for (int RandIndex = 0; RandIndex < 20; ++RandIndex)
{
FMatrix33 M = RandomMatrix(-10, 10);
FMatrix33 MI = M.Inverse();
FMatrix33 R = Utilities::Multiply(MI, M);
EXPECT_TRUE(R.Equals(FMatrix33::Identity, Tolerance));
}
}
}