protected double calculateTimeGradient(Score startScore, Score endScore, Score score) {
Score totalDiff = endScore.subtract(startScore);
Number[] totalDiffNumbers = totalDiff.toLevelNumbers();
Score scoreDiff = score.subtract(startScore);
Number[] scoreDiffNumbers = scoreDiff.toLevelNumbers();
if (scoreDiffNumbers.length != totalDiffNumbers.length) {
throw new IllegalStateException("The startScore (" + startScore + "), endScore (" + endScore
+ ") and score (" + score + ") don't have the same levelsSize.");
}
return ScoreUtils.calculateTimeGradient(totalDiffNumbers, scoreDiffNumbers, timeGradientWeightNumbers,