function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {
  let x1 = flatCoordinates[offset];
  let y1 = flatCoordinates[offset + 1];
  for (offset += stride; offset < end; offset += stride) {
    const x2 = flatCoordinates[offset];
    const y2 = flatCoordinates[offset + 1];
    const squaredDelta = squaredDx(x1, y1, x2, y2);
    if (squaredDelta > max) {
      max = squaredDelta;
    }
    x1 = x2;
    y1 = y2;
  }
  return max;
}
Return the squared of the largest distance between any pair of consecutive
coordinates.
@param {Array<number>} flatCoordinates Flat coordinates.
@param {number} offset Offset.
@param {number} end End.
@param {number} stride Stride.
@param {number} max Max squared delta.
@return {number} Max squared delta.