summaryrefslogtreecommitdiffstats
path: root/src/Entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entity.cpp')
-rw-r--r--src/Entity.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Entity.cpp b/src/Entity.cpp
new file mode 100644
index 0000000..8f76818
--- /dev/null
+++ b/src/Entity.cpp
@@ -0,0 +1,8 @@
+#include "Entity.hpp"
+
+VectorF Entity::DecodeVelocity(short x, short y, short z)
+{
+ const float ticksPerSecond = 20;
+ const double velMod = 1 / 8000.0;
+ return VectorF(x * velMod * ticksPerSecond, y*velMod*ticksPerSecond, z*velMod*ticksPerSecond);
+}