int blendNumbers(int n1, int n2, double factor) { return (n1 * factor + n2 * (1.0 - factor)).round(); }