Porting to linux
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "Core/Math/Include.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
Phanes::Core::Math::Vector3 v1(1.0f, 2.0f, 3.0f);
|
||||
Phanes::Core::Math::Vector3 v2(1.0f, 2.0f, 3.0f);
|
||||
namespace PMath = Phanes::Core::Math;
|
||||
|
||||
Phanes::Core::Math::Vector3 v3 = v1 + v2;
|
||||
int main()
|
||||
{
|
||||
PMath::Matrix4 m0 = PMath::Matrix4(1.0f, 5.0f, 3.0f, 4.0f,
|
||||
2.0f, 6.0f, 4.0f, 1.0f,
|
||||
2.0f, -3.0f, 5.0f, 3.0f,
|
||||
8.0f, -4.0f, 6.0f, -2.0f);
|
||||
|
||||
std::cout << "v3: " << Phanes::Core::Math::ToString(v3) << std::endl;
|
||||
|
||||
PMath::Matrix4 m2;
|
||||
|
||||
std::cout << std::to_string(PMath::InverseV<float, false>(m0)) << std::endl;
|
||||
|
||||
std::cout << PMath::ToString(m0) << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
2
MathTestFPU/pch.cpp
Normal file
2
MathTestFPU/pch.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
#include "pch.h"
|
||||
|
29
MathTestFPU/premake5.lua
Normal file
29
MathTestFPU/premake5.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
project "MathTestFPU"
|
||||
kind "ConsoleApp"
|
||||
boilerplate()
|
||||
|
||||
files {
|
||||
phanesRoot .. "/MathTestFPU/test.cpp"
|
||||
}
|
||||
|
||||
buildoptions {"-Wno-unused-variable", "-w", "-fpermissive"}
|
||||
|
||||
pchheader "pch.h"
|
||||
pchsource "pch.cpp"
|
||||
|
||||
includedirs {
|
||||
phanesRoot .. "/MathTestFPU",
|
||||
PhanesRuntime
|
||||
}
|
||||
|
||||
project "Test"
|
||||
kind "ConsoleApp"
|
||||
boilerplate()
|
||||
|
||||
files {
|
||||
phanesRoot .. "/MathTestFPU/main.cpp"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
PhanesRuntime
|
||||
}
|
@@ -1,9 +1,12 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "Core/public/Math/Include.h"
|
||||
#include "Core/Math/Include.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-fpermissive"
|
||||
|
||||
namespace PMath = Phanes::Core::Math;
|
||||
using namespace Phanes::Core::Math::UnitLiterals;
|
||||
|
||||
@@ -1263,7 +1266,7 @@ namespace Plane
|
||||
TEST(Plane, OperatorTests)
|
||||
{
|
||||
PMath::Plane pl1(3.0f / 5.4772255750f, -2.0f / 5.4772255750f, -3.0f / 5.4772255750f, 4.0f);
|
||||
PMath::Plane pl2(-0.526316f, -0.442105f, -0.726316f, 6.0f);
|
||||
PMath::Plane pl2 = PMath::Plane(-0.526316f, -0.442105f, -0.726316f, 6.0f);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user