summaryrefslogtreecommitdiff
path: root/xd.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-10-18 07:07:13 +0000
committerIan C <ianc@noddybox.co.uk>2018-10-18 07:07:13 +0000
commit3649f1f0319fa2ff434d2dfed3dfd3d731f92fad (patch)
tree6884117ddaaeb83c4ff1f6c40912d075ecef61a2 /xd.c
parent6d3b79043b175f76ba12ffbb729028f05cc065a5 (diff)
Small tweak for grav demo maths.
Diffstat (limited to 'xd.c')
-rw-r--r--xd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xd.c b/xd.c
index 8b19ce1..3615634 100644
--- a/xd.c
+++ b/xd.c
@@ -4005,9 +4005,7 @@ static void GravityDemo(void)
gravobj[r].mass += gravobj[f].mass;
}
- g = 1.0 / d*d;
-
- g *= gravobj[f].mass / 10000.0;
+ g = (0.000001 * gravobj[f].mass * gravobj[r].mass) / d*d;
dx /= d;
dy /= d;