I am trying to try and constrain shooting pictures when the phone is held (approximately) straight. The purpose here is to ensure - for example - that a facade, something lying on a horizontal surface is being shot straight.
I am using to detect changes in angles and I have come to the conclusion that:
Is this correct? Right now I am testing on iOS - but I'd be interested to know if this changes depending on platforms.
Provide some extra information, like the platform you're writing this code for. If you have access to the devices UI, you could try to compare the width and height of the window/viewport. If the width is greater than the height, it's in landscape.