# deviceRotation Source: https://www.nianticspatial.com/docs/api/swift/NSDK.ImageMath.method-deviceRotation/ deviceRotation --- ## Declaration static func deviceRotation(fromOrientation: UIInterfaceOrientation, toOrientation: UIInterfaceOrientation) -> CGAffineTransform #### Summary Returns an affine transform that rotates between two interface orientations around the center. This method models physical device rotation. For example, rotating from .landscapeRight to .portrait results in a clockwise transform. #### Returns A CGAffineTransform representing the rotation. ### Parameters | Name | Type | Summary | | --- | --- | --- | | fromOrientation | UIInterfaceOrientation | The starting interface orientation. | | toOrientation | UIInterfaceOrientation | The target interface orientation. | ---