O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Metric System

If you lived in almost any country other than the United States, you'd probably use metric units more than English units. This section is a quick review of how to work within the metric system, just in case it's been a while for you. I think after using it a bit you'll find that the metric system is much easier to work with because it's based on powers of 10.

When you're programming, the computer cannot distinguish between meters and centimeters. It understands only numbers, so it is up to you as the programmer to be consistent with the units of physical quantities in your program. We'll start with the metric system because it's much easier to work with. Your player will never know if you are working with miles or kilometers, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required