O'Reilly logo

101 Windows by Adam Nathan

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

Chapter 45. Coin Toss

image

image

Coin Toss helps you with any heads-or-tails type of decision. Make an upward tossing motion with the phone in your hand, and watch the coin of your choice flip to give you an answer. You can choose between a penny, nickel, dime, or quarter, and see a neat visual history of your coin tosses.

The lesson of this chapter is detecting a tossing/throwing motion with the phone. And surprise, surprise, it’s the same algorithm used in the preceding chapter for detecting punches! (I guess they call it ...

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