code: function windingArc(
      cx, cy, r, startAngle, endAngle, anticlockwise, x, y
  ) {
      y -= cy;
      if (y > r || y < -r) {
          return 0;
      }
      var tmp = Math.sqrt(r * r - y * y);
      roots[0] = -tmp;
      roots[1] = tmp;
  
      var diff = Math.abs(startAngle - endAngle);
      if (diff < 1e-4) {
          return 0;
      }
      if (diff % PI2 < 1e-4) {
          // Is a circle
          startAngle = 0;
          endAngle = PI2;
          var dir = anticlockwise ? 1 : -1;
          if (x >= roots[0] + cx && x <= roots[1] + cx) {
              return dir;
          }
          else {
              return 0;
          }
      }
  
      if (anticlockwise) {
          var tmp = startAngle;
          startAngle = normalizeRadian(endAngle);
          endAngle = normalizeRadian(tmp);
      }
      else {
          startAngle = normalizeRadian(startAngle);
          endAngle = normalizeRadian(endAngle);
      }
      if (startAngle > endAngle) {
          endAngle += PI2;
      }
  
      var w = 0;
      for (var i = 0; i < 2; i++) {
          var x_ = roots[i];
          if (x_ + cx > x) {
              var angle = Math.atan2(y, x_);
              var dir = anticlockwise ? 1 : -1;
              if (angle < 0) {
                  angle = PI2 + angle;
              }
              if (
                  (angle >= startAngle && angle <= endAngle)
                  || (angle + PI2 >= startAngle && angle + PI2 <= endAngle)
              ) {
                  if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {
                      dir = -dir;
                  }
                  w += dir;
              }
          }
      }
      return w;
  }
docs: TODO Arc 旋转