aboutsummaryrefslogtreecommitdiff
path: root/Client/Source
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-12-03 11:38:15 +0800
committerchai <chaifix@163.com>2021-12-03 11:38:15 +0800
commite9ff46e5c8cc1646eb780e64d01be7b3430a628c (patch)
treedc77c642cc231d7d4e1432b6f4217e22ee509ef5 /Client/Source
parentb62f87c9496cb38f9c49139386edf85d4fa14390 (diff)
+PND_LIB
Diffstat (limited to 'Client/Source')
-rw-r--r--Client/Source/PND/Common/Type.h9
-rw-r--r--Client/Source/PND/Math/Vector2.h3
-rw-r--r--Client/Source/PND/main.cpp8
3 files changed, 13 insertions, 7 deletions
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 <vector>
#include <unordered_map>
@@ -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 <iostream>
+#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