scaleCounts method
Implementation
OrbProfile scaleCounts(double factor) {
if (factor == 1) {
return this;
}
final root = math.sqrt(factor);
int pair(int v) => v == 0 ? 0 : math.max(2, (v * root).round());
int flat(int v) => v == 0 ? 0 : math.max(1, (v * factor).round());
return copyWith(
latRings: pair(latRings),
lonDensity: pair(lonDensity),
lanes: pair(lanes),
segs: pair(segs),
orbitN: flat(orbitN),
ghostN: flat(ghostN),
glyphDots: flat(glyphDots),
fieldN: flat(fieldN),
strandN: flat(strandN),
nodeN: flat(nodeN),
signals: flat(signals),
);
}