title: Accelerometer direction detection
body: <p>I have the following code </p>
  
  <pre><code>playerPosition.x += acceleration.x * 10;
  playerPosition.y += acceleration.y * 20;
  </code></pre>
  
  <p>acceleration currently works, I would like to detect if the player should move backwards(y decreasing) and if so change it to </p>
  
  <pre><code>playerPosition.y += acceleration.y * 10;
  </code></pre>
  
  <p>How does one detect if acceleration from the accelerometer is negative?</p>
  
  <p>How does one retrieve the direction of the movement? left right etc?</p>