code: @Pure
  	public double distance(Point2D<?, ?> point, double width) {
  		double mind = Double.MAX_VALUE;
  		double dist;
  		final Point2d pts1 = new Point2d();
  		final Point2d pts2 = new Point2d();
  
  		double w = width;
  		w = Math.abs(w) / 2.;
  
  		for (final PointGroup grp : groups()) {
  			for (int idx = 0; idx < grp.size(); idx += 2) {
  				if (grp.getMany(idx, pts1, pts2) > 1) {
  					dist = Segment2afp.calculatesDistanceSegmentPoint(
  							pts1.getX(), pts1.getY(), pts2.getX(), pts2.getY(),
  							point.getX(), point.getY()) - w;
  					if (dist < mind) {
  						mind = dist;
  					}
  				} else {
  					dist = pts1.getDistance(point);
  					if (dist < mind) {
  						mind = dist;
  					}
  				}
  			}
  		}
  
  		return mind;
  	}
docs: Replies the distance between this figure and the specified point.
  
  @param point is the x-coordinate of the point.
  @param width is the width of the polygon.
  @return the computed distance