diff options
| author | GreYFoXGTi <GreYFoXGTi@GMaiL.CoM> | 2011-02-13 08:47:51 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-02-13 12:57:10 +0100 |
| commit | 68a1a29db8641348937548fea1cb32dab2317a0c (patch) | |
| tree | b183103f2269e095b2a3180d34ea97e9dd75d03e /src/game/gamecore.h | |
| parent | 7bfbe24a1c55613219caa2ab59da7558207d9e82 (diff) | |
| download | zcatch-68a1a29db8641348937548fea1cb32dab2317a0c.tar.gz zcatch-68a1a29db8641348937548fea1cb32dab2317a0c.zip | |
Reverted 1 Letter Refactoring or Edited it to a full name.
Diffstat (limited to 'src/game/gamecore.h')
| -rw-r--r-- | src/game/gamecore.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/game/gamecore.h b/src/game/gamecore.h index 6e86d988..9e9ccf4d 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -54,19 +54,19 @@ inline vec2 GetDirection(int Angle) return vec2(cosf(a), sinf(a)); } -inline vec2 GetDir(float A) +inline vec2 GetDir(float Angle) { - return vec2(cosf(A), sinf(A)); + return vec2(cosf(Angle), sinf(Angle)); } inline float GetAngle(vec2 Dir) { if(Dir.x == 0 && Dir.y == 0) return 0.0f; - float A = atanf(Dir.y/Dir.x); + float a = atanf(Dir.y/Dir.x); if(Dir.x < 0) - A = A+pi; - return A; + a = a+pi; + return a; } inline void StrToInts(int *pInts, int Num, const char *pStr) @@ -105,13 +105,13 @@ inline void IntsToStr(const int *pInts, int Num, char *pStr) -inline vec2 CalcPos(vec2 P, vec2 V, float Curvature, float Speed, float T) +inline vec2 CalcPos(vec2 Pos, vec2 Velocity, float Curvature, float Speed, float Time) { - vec2 N; - T *= Speed; - N.x = P.x + V.x*T; - N.y = P.y + V.y*T + Curvature/10000*(T*T); - return N; + vec2 n; + Time *= Speed; + n.x = Pos.x + Velocity.x*Time; + n.y = Pos.y + Velocity.y*Time + Curvature/10000*(Time*Time); + return n; } |