summaryrefslogtreecommitdiff
path: root/src/entity.c
blob: 41210d3a7ce39ae403fc59804307ae8195670f80 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "entity.h"
#include "vector.h"


void entity_accelerate(struct Entity *e, struct Vec2d *v)
{
    struct Vec2d new_vec = vec2d_add(e->velocity, *v);
    //printf("(%f, %f)\n", new_vec.x, new_vec.y);
    e->velocity.x = new_vec.x;
    e->velocity.y = new_vec.y;
}