I'd do the multiplication outside of the max, so you only need it once.  Then you don't need to define a constant:

  Math.round(Math.max(window.innerWidth, window.innerHeight) * window.devicePixelRatio / 4)