From d3948e96b0560aaff3433fd387f85062e737a8bb Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Mon, 30 Sep 2024 16:26:41 -0400 Subject: acceleration independent of mass --- balls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/balls.c b/balls.c index 1b17304..f156aab 100644 --- a/balls.c +++ b/balls.c @@ -6,7 +6,8 @@ #define NELEMS(arr) (sizeof(arr) / sizeof(arr[0])) -#define G 9.81 +#define G_FACTOR 15.0 +#define G (9.81/G_FACTOR) enum { BG = DWhite, @@ -306,7 +307,7 @@ ball(void *arg) { oldpos = b.p; for (;;) { - b.v.y += b.m * G; + b.v.y += G; b.p = ptaddv(b.p, b.v); -- cgit v1.2.3