getSubAlpha method

double getSubAlpha(
  1. double alpha,
  2. int i,
  3. int numSubmobjects
)

Implementation

double getSubAlpha(double alpha, int i, int numSubmobjects) {
  var fullLength = (numSubmobjects - 1) * lagRatio + 1;
  var value = alpha * fullLength;
  var lower = i * lagRatio;
  return clip(value - lower, 0, 1);
}