This code already does the multiplication. That's what DEVICE_RATIO is. 

Given that this confused, you though, consider getting rid of the DEVICE_RATIO variable and making the code more explicit.  Note, though, that if you put the multiplication outside of the Math.max you only have to do it once instead of twice.