code: public double distance(Coordinate c) {
  		Coordinate nearest = this.nearest(c);
  		LineSegment ls = new LineSegment(c, nearest);
  		return ls.getLength();
  	}
docs: Return the distance from a point to this linesegment. If the point is not perpendicular to the linesegment, the
  closest endpoint will be returned.
  
  @param c
  The {@link Coordinate} to check distance from.