title: Why CGPath and UIBezierPath define "clockwise" differently in SpriteKit?
body: <p>In SpriteKit, the <code>clockwise</code> direction is reversed for <code>UIBezierPath</code> but not for <code>CGPath</code>. For example, if I have</p>
  
  <pre><code>do {
      let path = CGPathCreateMutable()
      CGPathAddArc(path, nil, 0, 0, 10, 0, CGFloat(M_PI_2), true)
      let node = SKShapeNode(path: path)
      node.position = CGPoint(x: self.size.width/2, y: self.size.height/2)
      self.addChild(node)
  }
  do {
      let path = UIBezierPath()
      path.addArcWithCenter(CGPoint(x: 0, y: 0), radius: 10, startAngle: 0, endAngle: CGFloat(M_PI_2), clockwise: true)
      let node = SKShapeNode(path: path.CGPath)
      node.position = CGPoint(x: self.size.width/2, y: self.size.height/2 - 100)
      self.addChild(node)
  }
  </code></pre>
  
  <p>in <code>GameScene.didMoveToView(view: SKView)</code>, the first node draws a 3/4 arc with top-right missing, but the second node draws a quarter arc at top-right. The reversed "clockwise" direction in <code>UIBezierPath</code> is explained <a href="http://www.simosh.com/article/dggggjha-circle-from-uibezierpath-drawn-in-wrong-direction-in-skshapenode.html" rel="noreferrer">in this post</a>, but why doesn't <code>CGPath</code> behave the same? Isn't <code>UIBezierPath</code> just a wrapper around <code>CGPath</code>?</p>
  
  <p>Note: This happens to both Objective-C and Swift (so not language-specific). Did not try on Mac App with <code>NSBezierPath</code>.</p>