Previous Section  < Day Day Up >  Next Section

Chapter 7. Unit Conversions

KEY TOPICS

As we prepare to transition into the physics chapters of this book, there's one last mathematical concept to master: unit conversions. In physics, we deal with physical quantities such as speed and displacement. The units in which they're measured often get overlooked to the detriment of many projects. You might remember that in the fall of 1999, the Mars Climate Orbiter was declared lost by NASA. The mission failed because one project group used English units and one used metric units when programming the maneuvering system. The Orbiter was eventually sent off target and got lost in space. Imagine what could happen in your game if the units aren't all consistent. If one team member programs in meters and another team member programs in miles, some interesting bugs will appear when the team members try to integrate their code. Unfortunately, a lot of time can be lost in debugging if nobody thinks to check the units, so this chapter is dedicated to the small but very important detail of units.

    Previous Section  < Day Day Up >  Next Section