summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-09-30 16:26:41 -0400
committerSam Anthony <sam@samanthony.xyz>2024-09-30 16:26:41 -0400
commitd3948e96b0560aaff3433fd387f85062e737a8bb (patch)
tree9407c69e22715ad5609602cc4d80c6c7c040f403
parent875b78cfddaf1fbf2d9c34de6091f582596b33e7 (diff)
downloadballs-d3948e96b0560aaff3433fd387f85062e737a8bb.zip
acceleration independent of mass
-rw-r--r--balls.c5
1 files 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);