docs: public boolean computeEdge(Polygon2D_F64 polygon , boolean ccw ) {
  		averageInside = 0;
  		averageOutside = 0;
  
  		double tangentSign = ccw ? 1 : -1;
  
  		int totalSides = 0;
  		for (int i = polygon.size()-1,j=0; j < polygon.size(); i=j,j++) {
  
  			Point2D_F64 a = polygon.get(i);
  			Point2D_F64 b = polygon.get(j);
  
  			double dx = b.x-a.x;
  			double dy = b.y-a.y;
  			double t = Math.sqrt(dx*dx + dy*dy);
  			dx /= t;
  			dy /= t;
  
  			// see if the side is too small
  			if( t < 3*cornerOffset ) {
  				offsetA.set(a);
  				offsetB.set(b);
  			} else {
  				offsetA.x = a.x + cornerOffset * dx;
  				offsetA.y = a.y + cornerOffset * dy;
  
  				offsetB.x = b.x - cornerOffset * dx;
  				offsetB.y = b.y - cornerOffset * dy;
  			}
  
  			double tanX = -dy*tangentDistance*tangentSign;
  			double tanY =  dx*tangentDistance*tangentSign;
  
  			scorer.computeAverageDerivative(offsetA, offsetB, tanX,tanY);
  
  			if( scorer.getSamplesInside() > 0 ) {
  				totalSides++;
  				averageInside += scorer.getAverageUp() / tangentDistance;
  				averageOutside += scorer.getAverageDown() / tangentDistance;
  			}
  		}
  
  		if( totalSides > 0 ) {
  			averageInside /= totalSides;
  			averageOutside /= totalSides;
  		} else {
  			averageInside = averageOutside = 0;
  			return false;
  		}
  
  		return true;
  	}