aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-03-06 17:11:47 +0000
committerrodri <rgl@antares-labs.eu>2021-03-06 17:11:47 +0000
commit5ecc14e07c5dcc40e418f450f0c34dceb7f7e326 (patch)
treed916d6934cc119c192cae31d6b791d8b94e14421 /dat.h
downloadgamephysics-5ecc14e07c5dcc40e418f450f0c34dceb7f7e326.tar.gz
gamephysics-5ecc14e07c5dcc40e418f450f0c34dceb7f7e326.tar.bz2
gamephysics-5ecc14e07c5dcc40e418f450f0c34dceb7f7e326.zip
implemented three integrators and a simple time stepping model.
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/dat.h b/dat.h
new file mode 100644
index 0000000..6503042
--- /dev/null
+++ b/dat.h
@@ -0,0 +1,14 @@
+typedef struct State State;
+typedef struct Derivative Derivative;
+
+struct State
+{
+ double x, v;
+ double acc, min, max, avg;
+ int nsteps;
+};
+
+struct Derivative
+{
+ double dx, dv;
+};