Graphics Programs Reference
In-Depth Information
Figure 2-20
.
Stagnating rotation for large inclinations (Gravity 3.10)
Figure 2-21
.
Stagnating rotation for large inclinations (Gravity 0.87)
To achieve this, the device is considered parallel only if
_gravityFiltered
is
greater than or equal to 6. Inside the
if
block for handling this condition, there are
lines of code to scale the angle of rotation (depending on the extent of inclination)
to make it smooth. After scaling the angle, the results are displayed on a
TextView
(
Listing 2-16
).

Search WWH ::

Custom Search