summaryrefslogtreecommitdiff
path: root/2d/rigidbody/rigidbody_1.html
diff options
context:
space:
mode:
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;