So on a regular 320x480 device with a 90 degree sensor angle, and 1600x1200 photos, before this code runs, we'd have:

screenWidth = 320
previewWidth = 480
screenHeight = 480
previewHeight = 320
previewAspectRatio = 1.5
pictureAspectRatio = 1.33

Then the else clause of this code would run and we'd have

previewWidth = 480
previewHeight = 360

I guess that seems right.