You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
30 lines
575 B
C++
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));
|
|
}
|
|
}
|
|
|
|
|
|
}
|