function pathDSegment (letter, points, morePoints, lastPoint) {
  points.forEach(function (pnt, i) {
    points[i] = shortFloat(pnt)
  })
  let segment = letter + points.join(' ')
  if (morePoints) {
    segment += ' ' + morePoints.join(' ')
  }
  if (lastPoint) {
    segment += ' ' + shortFloat(lastPoint)
  }
  return segment
}
TODO: refactor callers in `convertPath` to use `getPathDFromSegments` instead of this function.
Legacy code refactored from `svgcanvas.pathActions.convertPath`.
@param {string} letter - path segment command (letter in potentially either case from {@link module:path.pathMap}; see [SVGPathSeg#pathSegTypeAsLetter]{@link https://www.w3.org/TR/SVG/single-page.html#paths-__svg__SVGPathSeg__pathSegTypeAsLetter})
@param {GenericArray<GenericArray<Integer>>} points - x,y points
@param {GenericArray<GenericArray<Integer>>} [morePoints] - x,y points
@param {Integer[]} [lastPoint] - x,y point
@returns {string}