From f4e392912a3812b602f787c6db30296cea14962e Mon Sep 17 00:00:00 2001 From: Simponic Date: Fri, 6 Nov 2020 11:48:27 -0700 Subject: Added files --- src/velocity.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/velocity.h (limited to 'src/velocity.h') diff --git a/src/velocity.h b/src/velocity.h new file mode 100644 index 0000000..3c48949 --- /dev/null +++ b/src/velocity.h @@ -0,0 +1,21 @@ +#ifndef VELOCITY_H +#define VELOCITY_H + +#include "acceleration.h" + +class Velocity { + private: + float dx; + float dy; + public: + Velocity(); + Velocity(const float dx, const float dy); + void setDx(const float dx); + void setDy(const float dy); + float getDx(); + float getDy(); + void addVelocity(Velocity &vel); + void update(Acceleration &acc); +}; + +#endif -- cgit v1.2.3-70-g09d2