vectorSlerpOptimized static method
Implementation
static Float32x4 vectorSlerpOptimized(Float32x4List preList, Float32x4 last, double step, double t) {
var matchedRangeStartIndex = t ~/ step;
var length = preList.length - 1;
if (matchedRangeStartIndex == length) return last;
var modulus = t >= step ? (t - matchedRangeStartIndex * step) : t;
var segment = modulus / step;
return lerpUnclampedOptimized(
preList[matchedRangeStartIndex],
preList[matchedRangeStartIndex + 1],
Float32x4.splat(segment),
);
}