Skip to Content
Augmented Reality for Developers
book

Augmented Reality for Developers

by Jonathan Linowes, Krystian Babilinski
October 2017
Intermediate to advanced
548 pages
13h 23m
English
Packt Publishing
Content preview from Augmented Reality for Developers

Adding a global timescale

Presently, you might have already noticed that both our scripts, Spin and Orbit, have a gametimePerDay variable that does the same thing--defines the number of game seconds that correspond to an earth hour.

No one writes code without expecting to change it. Programming is a dynamic art as you rethink how to do things, as requirements grow, and problems get fixed. Sometimes, these changes are not necessarily to add a new feature or fix a bug but to make the code cleaner, easier to use, and easier to maintain. This is called refactoring, when you change or rewrite parts of a program but do not necessarily change what it does, that is, its behavior.

Let's refactor our code to remove this duplication and put this variable ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Augmented Reality Game Development

Augmented Reality Game Development

Micheal Lanham
Augmented Reality

Augmented Reality

Joseph Rampolla, Greg Kipper

Publisher Resources

ISBN: 9781787286436Supplemental Content