#include "acceleration.h" #include "velocity.h" Velocity :: Velocity() { setDx(0.0f); setDy(0.0f); } Velocity :: Velocity(const float dx, const float dy) { setDx(0.0f); setDy(0.0f); } void Velocity :: setDx(const float dx) { this->dx = dx; } void Velocity :: setDy(const float dy) { this->dy = dy; } float Velocity :: getDx() { return this->dx; } float Velocity :: getDy() { return this->dy; } void Velocity :: addVelocity (Velocity &vel) { this->dx += vel.getDx(); this->dy += vel.getDy(); } void Velocity :: update(Acceleration &acc) { this->dx += acc.getD2x(); this->dy += acc.getD2y(); }