As it is, this formula returns false when in portrait mode, but true in landscape mode for isTablet. Perhaps the values should be normalized so that height is always the greater of the two?