diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-09-30 16:26:41 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-09-30 16:26:41 -0400 |
| commit | d3948e96b0560aaff3433fd387f85062e737a8bb (patch) | |
| tree | 9407c69e22715ad5609602cc4d80c6c7c040f403 | |
| parent | 875b78cfddaf1fbf2d9c34de6091f582596b33e7 (diff) | |
| download | balls-d3948e96b0560aaff3433fd387f85062e737a8bb.zip | |
acceleration independent of mass
| -rw-r--r-- | balls.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |