I would still like it better if you removed this `if` and just moved `newScale = Math.min(MAX_SCALE, newScale);` down here, similar below.