code: func (p *Path) Intersection(geometry interface{}) ([]*Point, [][2]int) {
  	var points []*Point
  	var segments [][2]int
  
  	switch g := geometry.(type) {
  	case Line:
  		points, segments = p.IntersectionLine(&g)
  	case *Line:
  		points, segments = p.IntersectionLine(g)
  	case Path:
  		points, segments = p.IntersectionPath(&g)
  	case *Path:
  		points, segments = p.IntersectionPath(g)
  	default:
  		panic("can only determine intersection with lines and paths")
  	}
  
  	return points, segments
  }
docs: // Intersection calls IntersectionPath or IntersectionLine depending on the
  // type of the provided geometry.
  // TODO: have this receive an Intersectable interface.