summaryrefslogtreecommitdiff
path: root/2d/rigidbody/rigidbody_1.html
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-06-24 13:49:23 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-06-24 13:49:23 -0400
commit410a072c3862481f729c293402ddd49c5ae98769 (patch)
tree6fbd4b31b355cd0228bd790415762b446dcd4ab3 /2d/rigidbody/rigidbody_1.html
parent0f1275d7ba1a7e3ad838423c15d78e23c960f80e (diff)
(mkosarek) Decent enough discussion of 2d rotational forces
Diffstat (limited to '2d/rigidbody/rigidbody_1.html')
-rw-r--r--2d/rigidbody/rigidbody_1.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/2d/rigidbody/rigidbody_1.html b/2d/rigidbody/rigidbody_1.html
index 8e78972..79fd09b 100644
--- a/2d/rigidbody/rigidbody_1.html
+++ b/2d/rigidbody/rigidbody_1.html
@@ -103,7 +103,7 @@
</section>
<section>
- <h2>The Kinematics Data Structure</h2>
+ <h2>The Data Structure</h2>
<p>
Now that we have an understanding of these two fundamental fields of physics, we can begin setting up our rigidbody data structure.
@@ -118,7 +118,7 @@
</p>
</section>
<section>
- <h2>The Dynamics Functions</h2>
+ <h2>The Functions</h2>
<p>
Now, let's put that Rigidbody data structure to work! As I mentioned earlier, you can think of dynamics as the <i>input</i> to the system. What we're going to do now is add a way apply some sort of force to our rigidbody instantaneously.
@@ -174,7 +174,7 @@
<span class="code_keyword">bool</span> isDead = false;
};
-const <span class="code_keyword">int32</span> NUM_IMPULSES = 4;
+<span class="code_keyword">const</span> <span class="code_keyword">int32</span> NUM_IMPULSES = 4;
<span class="code_keyword">struct</span> Rigidbody {
<span class="code_keyword">int32</span> numImpulses = 0;
@@ -228,7 +228,7 @@ const <span class="code_keyword">int32</span> NUM_IMPULSES = 4;
<span class="code_keyword">void</span> applyImpulse(Impulse i) {
if (numImpulses > NUM_IMPULSES) {
printf("Unable to apply impulse. Buffer full.\n");
- return;
+ <span class="code_keyword">return</span>;
}
activeImpulses[numImpulses] = i;