# calculateViewRotation Source: https://www.nianticspatial.com/docs/api/kotlin/com.nianticspatial.nsdk.utils.ImageMath.calculateViewRotation/ calculateViewRotation --- ## Declaration fun calculateViewRotation(fromOrientation: Orientation, toOrientation: Orientation): Matrix #### Summary Returns an affine transform that rotates between two interface orientations around the center. This method models UI rotation (opposite to physical device rotation). #### Returns An affine Matrix that rotates from the fromOrientation into the toOrientation. ### Parameters | Name | Type | Summary | | --- | --- | --- | | fromOrientation | Orientation | Starting orientation. | | toOrientation | Orientation | Target orientation. | ---