code: func (p *Path) ResampleWithInterval(dist float64) *Path {
  	if dist <= 0 {
  		p.PointSet = make([]Point, 0)
  		return p
  	}
  
  	// precomputes the total distance and intermediate distances
  	total, dists := precomputeDistances(p.PointSet)
  
  	totalPoints := int(total/dist) + 1
  	if p.resampleEdgeCases(totalPoints) {
  		return p
  	}
  
  	p.resample(dists, total, totalPoints)
  	return p
  }
docs: // ResampleWithInterval coverts the path into evenly spaced points of
  // about the given distance. The total distance is computed using euclidean
  // geometry and then divided by the given distance to get the number of segments.