getUIRotation

function getUIRotation(targetOrientation: CameraOrientation, interfaceOrientation: CameraOrientation): number

Gets the short rotation that UI controls need to apply to match the target output orientation while remaining relative to the interface orientation.

Parameters

targetOrientation

The orientation that Camera outputs target.

interfaceOrientation

The current app interface orientation.

Returns

The shortest signed rotation in degrees.

On this page

No Headings