From e9ff46e5c8cc1646eb780e64d01be7b3430a628c Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 3 Dec 2021 11:38:15 +0800 Subject: +PND_LIB --- Client/Source/PND/Common/Type.h | 9 +++++---- Client/Source/PND/Math/Vector2.h | 3 +-- Client/Source/PND/main.cpp | 8 +++++++- 3 files changed, 13 insertions(+), 7 deletions(-) (limited to 'Client/Source') diff --git a/Client/Source/PND/Common/Type.h b/Client/Source/PND/Common/Type.h index 4033ab1..9b768e9 100644 --- a/Client/Source/PND/Common/Type.h +++ b/Client/Source/PND/Common/Type.h @@ -1,7 +1,8 @@ #pragma once -#include "libfixmath/libfixmath/fix16.h" +#include "libfixmath/libfixmath/fix16.hpp" +#include "fix32/fix32.hpp" -typedef fix16_t fixed16; // Q16.16 - -typedef fixed16 fixed; +typedef Fix32 fixed32; +typedef Fix16 fixed16; +typedef fixed32 fixed; diff --git a/Client/Source/PND/Math/Vector2.h b/Client/Source/PND/Math/Vector2.h index 51c9f40..67ac4b7 100644 --- a/Client/Source/PND/Math/Vector2.h +++ b/Client/Source/PND/Math/Vector2.h @@ -1,6 +1,5 @@ #pragma once - #include #include @@ -10,6 +9,6 @@ class Vector2 { public: - fixed x, y; + fixed32 x, y; }; diff --git a/Client/Source/PND/main.cpp b/Client/Source/PND/main.cpp index f6bb3d7..5f2628a 100644 --- a/Client/Source/PND/main.cpp +++ b/Client/Source/PND/main.cpp @@ -1,7 +1,13 @@ - +#include +#include "Math/Vector2.h" +using namespace std; int main() { + Vector2 v; + v.x = 1; + v.y = 2; + getchar(); return 0; } \ No newline at end of file -- cgit v1.1-26-g67d0