---
title: "assertRotationInRootIsEqualTo"
description: "Asserts that the layout of this node has rotation in the root composable that is equal to the given rotation."
type: "function"
lastmod: "2026-06-18T10:32:52.429957Z"
---
## API Reference

### assertRotationInRootIsEqualTo

> Source set: Android

```kotlin
@CanIgnoreReturnValue
public fun SubspaceSemanticsNodeInteraction.assertRotationInRootIsEqualTo(
    expected: Quaternion,
    tolerance: Float = 0.01f,
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has rotation in the root composable that is equal to the
given rotation.

This assertion uses a tolerance to account for floating-point inaccuracies.

#### Parameters

| | |
| --- | --- |
| expected | The expected rotation in the root space to assert. |
| tolerance | The maximum allowed angular distance in degrees between the orientations. |
