code: function(circ, poly)
  {
      var planes = poly.tPlanes;
      
      var mini = 0;
      var min = vdot(planes[0].n, circ.tc) - planes[0].d - circ.r;
      for(var i=0; i<planes.length; i++){
          var dist = vdot(planes[i].n, circ.tc) - planes[i].d - circ.r;
          if(dist > 0){
              return NONE;
          } else if(dist > min) {
              min = dist;
              mini = i;
          }
      }
      
      var n = planes[mini].n;
  
      var verts = poly.tVerts;
      var len = verts.length;
      var mini2 = mini<<1;
  
      //var a = poly.tVerts[mini];
      //var b = poly.tVerts[(mini + 1)%poly.tVerts.length];
      var ax = verts[mini2];
      var ay = verts[mini2+1];
      var bx = verts[(mini2+2)%len];
      var by = verts[(mini2+3)%len];
  
      var dta = vcross2(n.x, n.y, ax, ay);
      var dtb = vcross2(n.x, n.y, bx, by);
      var dt = vcross(n, circ.tc);
          
      if(dt < dtb){
          var con = circle2circleQuery(circ.tc, new Vect(bx, by), circ.r, 0, con);
          return con ? [con] : NONE;
      } else if(dt < dta) {
          return [new Contact(
              vsub(circ.tc, vmult(n, circ.r + min/2)),
              vneg(n),
              min,
              0
          )];
      } else {
          var con = circle2circleQuery(circ.tc, new Vect(ax, ay), circ.r, 0, con);
          return con ? [con] : NONE;
      }
  }
docs: This one is less gross, but still gross. TODO: Comment me!