interpolate method

  1. @override
dynamic interpolate(
  1. int i1,
  2. num x0,
  3. num t,
  4. num t1,
)

Implementation

@override
interpolate(int i1, num x0, num t, num t1) {
  var result = resultBuffer;
  var values = sampleValues;
  var stride = valueSize;

  double _v0 = t + (x0 * -1);
  double _v1 = t1 + (x0 * -1);

  double alpha = _v0 / _v1;

  var offset = i1 * stride;

  for (var end = offset + stride; offset < end; offset += 4) {
    Quaternion.slerpFlat(
        result, 0, values, offset - stride, values, offset, alpha);
  }

  return result;
}