Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed wave_player
Fork of MazeRunner_Fall2017-shell by
Diff: physics.h
- Revision:
- 0:cf4396614a79
- Child:
- 1:2c6ae0fe9a2a
diff -r 000000000000 -r cf4396614a79 physics.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/physics.h Fri Nov 03 18:48:48 2017 +0000
@@ -0,0 +1,22 @@
+#pragma once
+
+/**
+ * The main state structure for the game.
+ * This structure holds all the global state for the game, and is updated during
+ * the game loop. When you implement the "jump back" feature, this is the
+ * structure you need to save/restore.
+ */
+struct Physics {
+ float px, py; // Ball position
+ float vx, vy; // Ball velocity
+ float ax, ay; // Ball acceleration
+};
+
+/**
+ * Performs one step of Forward Euler integration, given a time step delta.
+ *
+ * @param[out] out The structure to store the result of the integration.
+ * @param[in] in The current state of the system.
+ * @param[in] delta The time step, in seconds.s
+ */
+void forward_euler(Physics* state, float delta);
\ No newline at end of file
