fix variable renaming in ball_elastic_collision.

This commit is contained in:
Antonio Carzaniga 2022-06-10 12:47:03 +02:00
parent 4725f1eb6a
commit 94ec166a4a

View File

@ -99,8 +99,8 @@ void ball_elastic_collision (ball * p, ball * q) {
if (f < 0) {
f /= d2*(mp + mq);
p->velocity += 2*mq*f*dp;
q->velocity -= 2*mp*f*dp;
p->velocity += 2*mq*f*pq;
q->velocity -= 2*mp*f*pq;
}
}
}