Converting Units Between Systems

Converting between different systems of units is a little more complicated than staying within metrics. That's why I suggest estimating distances in meters and estimating speeds in kilometers per hour. Unfortunately, if you grew up in the United States, it's a lot more natural to estimate quantities in English units, such as speeds in miles per hour.

In game programming, you'll mostly be dealing with length and time quantities, so we'll focus on those. There will be times when you'll need to convert within the English system, and there will be times when you'll need to convert between the English and metric systems. In either case, the process is the same.

When you are converting units, it is very important to ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.