title: Consistent Rotation Speed, iOS Sprite Kit
body: <p>I'd like to rotate a spaceship around the z axis with the SKAction rotation method, depending on touch coordinates. After a touch the spaceship's nose should point to the touch point.</p>
  
  <pre><code>CGFloat rad = atan2f(touchPos.y - sprite.position.y, touchPos.x - sprite.position.x); // calc rad between vectors
  
  SKAction *rotation = [SKAction rotateToAngle: rad duration: ??? shortestUnitArc:YES];
  </code></pre>
  
  <p>How can I adjust the duration so that the rotation speed is always the same (no matter how big the rotation angle is)?</p>
  
  <p>The problem is that the radian occurs in the interval from -pi to pi (because of atan2). So the rotation depends on the quadrant touched and so does the speed.</p>
  
  <p><img src="https://i.stack.imgur.com/sQ27i.png" alt="enter image description here"></p>