let w
and h
be the width and the height of the screen, respectively.
let a
be the ratio of the width to the height.
a = w / h
Note that this is equivalent to the aspect ratio of the screen for the case where the screen is wider than it is tall, and the inverse of the aspect ratio otherwise.
Let q
be the area of the screen.