getRelativeRotationDegrees

@IntRange(from = 0, to = 359)
open fun getRelativeRotationDegrees(targetRotation: Int, requiredMirroring: Boolean): Int

Calculates the relative rotation between the source and the destination.

Return

relative rotation between the source and the destination.

Parameters

targetRotation

rotation of the destination (Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_180 or Surface.ROTATION_270).

requiredMirroring

true if the destination requires mirroring.