There is a problem that my brain I can not afford to solve, namely the creation of if-else conditions:
960×540 is the value for which we obtain the value of “1”, all values less than this (for example 800×480) get again value “1”, a similar situation 540×960 (480×800, etc. in descending order with smaller numbers), if the value of the number of 960×540 increases from one side (for example 1000×540 or 960×600), then give “2” in a variable instead of “1” … I hope I have clearly described the problem.
I was advised to multiply for example 960×540, and an overall value, make it easier to work with it. But the problem lies in the fact that I work with a screen resolution of mobile phones and is not suitable for the reason that we forget about the desktop with the low resolution, like 800×600 pixels which are the cumulative number of much less than that of the screen with a resolution of 540×960… Sorry for bad English.
There is a problem that my brain I can not afford to solve, namely
Share
I’ll try to explain your request more clear. (I did not edit your question since I’m not sure I got everything right)
Smaller values => 1
Greater values (each dimension) => 2
You have to look at both x- and y-resolutions and determine your result.
Do not try to check for specific resolutions, because this will get a really complex condition.
Your if-statement should look like this: