I am implementing a demo TIMER, with Vibration ( at a particular condition ), When I press start my timer starts running.. and when I stop it using stop button, it simply stops.
Two suggestions, and one thought:
Math.sqrt(x*x+y*y+z*z)
, rather than the individual values. Mathematically, it's Math.sqrt(x*x+y*y+z*z)
that's independent of your co-ordinate system, i.e. how the device is oriented relative to the ground etc, whereas the individual numbers x, y, z aren't.Math.sqrt(x*x+y*y+z*z)
.