better done as `if (tempWidth > tempHeight && tempWidth > maxWidth)`
or `if(tempWidth > Math.max(tempHeight, maxWidth))`