const {units, unitLengths, unitPartials, unitProgression, unitPositions} = res;
let lastLength = 0,
currentPartial,
lastPartial,
progression,
flatProgression = [],
flatPositions = [],
positions,
i, iz, j, jz, l, p;
for (i = 0, iz = unitLengths.length; i < iz; i++) {
lastLength += unitLengths[i];
progression = unitProgression[i];
if (progression) {
lastPartial = unitPartials[i];
currentPartial = unitPartials[i + 1] - lastPartial;
positions = unitPositions[i];
for (j = 0, jz = progression.length; j < jz; j++) {
l = lastLength + progression[j];
flatProgression.push(parseFloat(l.toFixed(1)));
p = lastPartial + (positions[j] * currentPartial);
flatPositions.push(parseFloat(p.toFixed(6)));
}
}
}
this.units = units;
this.unitLengths = unitLengths;
this.unitPartials = unitPartials;
this.unitProgression = flatProgression;
this.unitPositions = flatPositions;
}
if (!isCalledFromAdditionalActions) this.calculateLocalPathAdditionalActions();
}
};
P.calculateLocalPathAdditionalActions = λnull;