diff options
author | chai <chaifix@163.com> | 2021-12-02 12:46:50 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-12-02 12:46:50 +0800 |
commit | b1d4e9866de19c70174553e543e81ef4473dee6c (patch) | |
tree | fa1518ce5e6580886d8f8b4d9772474cd6f67184 /Client/Source/Phy2DLite/Tests/test.cpp | |
parent | 83fedef41f6dcea4dde010abb025b7ed647d0501 (diff) |
*number -> fixed
Diffstat (limited to 'Client/Source/Phy2DLite/Tests/test.cpp')
-rw-r--r-- | Client/Source/Phy2DLite/Tests/test.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Client/Source/Phy2DLite/Tests/test.cpp b/Client/Source/Phy2DLite/Tests/test.cpp index 6456b75..c2dbc54 100644 --- a/Client/Source/Phy2DLite/Tests/test.cpp +++ b/Client/Source/Phy2DLite/Tests/test.cpp @@ -13,7 +13,6 @@ #include "../Phy2D.h"
#include "glad/glad.h"
-using namespace std;
using namespace Phy2D;
namespace @@ -92,7 +91,7 @@ static void Demo1(Body* b, Joint* j) float x, y; b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); world.Add(b); ++b; ++numBodies; @@ -108,7 +107,7 @@ static void Demo2(Body* b, Joint* j) Body* b1 = b + 0; b1->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); b1->friction = 0.2f; - b1->position.Set(0.0f, (number)-0.5f * b1->width.y); + b1->position.Set(0.0f, (fixed)-0.5f * b1->width.y); b1->rotation = 0.0f; world.Add(b1); @@ -131,7 +130,7 @@ static void Demo2(Body* b, Joint* j) static void Demo3(Body* b, Joint* j) { b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); world.Add(b); ++b; ++numBodies; @@ -179,7 +178,7 @@ static void Demo4(Body* b, Joint* j) { b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); b->friction = 0.2f; - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); b->rotation = 0.0f; world.Add(b); ++b; ++numBodies; @@ -201,7 +200,7 @@ static void Demo5(Body* b, Joint* j) { b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); b->friction = 0.2f; - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); b->rotation = 0.0f; world.Add(b); ++b; ++numBodies; @@ -234,7 +233,7 @@ static void Demo6(Body* b, Joint* j) { Body* b1 = b + 0; b1->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); - b1->position.Set(0.0f, (number)-0.5f * b1->width.y); + b1->position.Set(0.0f, (fixed)-0.5f * b1->width.y); world.Add(b1); Body* b2 = b + 1; @@ -270,7 +269,7 @@ static void Demo7(Body* b, Joint* j) { b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); b->friction = 0.2f; - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); b->rotation = 0.0f; world.Add(b); ++b; ++numBodies; @@ -292,7 +291,7 @@ static void Demo7(Body* b, Joint* j) float dampingRatio = 0.7f; // frequency in radians - float omega = (number)2.0f * PI * frequencyHz; + float omega = (fixed)2.0f * PI * frequencyHz; // damping coefficient float d = 2.0f * mass * dampingRatio * omega; @@ -326,7 +325,7 @@ static void Demo8(Body* b, Joint* j) { Body* b1 = b; b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); world.Add(b); ++b; ++numBodies; @@ -403,7 +402,7 @@ static void Demo9(Body* b, Joint* j) { b->Set(Vec2(100.0f, 20.0f), NUMBER_MAX); b->friction = 0.2f; - b->position.Set(0.0f, (number)-0.5f * b->width.y); + b->position.Set(0.0f, (fixed)-0.5f * b->width.y); b->rotation = 0.0f; world.Add(b); @@ -418,7 +417,7 @@ static void Demo9(Body* b, Joint* j) float dampingRatio = 0.7f; // frequency in radians - float omega = (number) 2.0f * PI * frequencyHz; + float omega = (fixed) 2.0f * PI * frequencyHz; // damping coefficient float d = 2.0f * mass * dampingRatio * omega; |