generateNextScale method

double generateNextScale(
  1. {double lastScale,
  2. double maxScale,
  3. bool scaleDown}
)

Implementation

double generateNextScale(
    {double lastScale, double maxScale, bool scaleDown}) {
  final double minScale = 1.0;
  if (scaleDown && minScale < lastScale) {
    return _randomValue(minScale, lastScale);
  } else {
    return _randomValue(max(minScale, lastScale), maxScale);
  }
}