[Change] Minor change to physics.

This commit is contained in:
Allanis 2013-02-27 04:18:37 +00:00
parent a6c758aa66
commit eee3ef3065

View File

@ -62,7 +62,7 @@ void vectnull(Vec2* v) {
// Get the direction pointed to by two vectors (from ref to v).
double vect_angle(const Vec2* ref, const Vec2* v) {
return ANGLE(VX(*v)-VX(*ref), VY(*v)-VY(*ref));
return ANGLE(v->x - ref->x, v->y - ref->y);
}
void vect_cadd(Vec2* v, const double x, const double y) {
@ -148,10 +148,10 @@ static void rk4_update(Solid* obj, const double dt) {
double h = dt / (double)N; // Step.
double px, py, vx, vy;
px = VX(obj->pos);
py = VY(obj->pos);
vx = VX(obj->vel);
vy = VY(obj->vel);
px = obj->pos.x;
py = obj->pos.y;
vx = obj->vel.x;
vy = obj->vel.y;
if(obj->force.mod) { // Force applied on object.
int i;