# MathAssertions

Added in 1.0.0

*** ** * ** ***


```
public final class MathAssertions
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final void` | `https://developer.android.com/reference/androidx/xr/runtime/testing/math/MathAssertions#assertPose(androidx.xr.runtime.math.Pose,androidx.xr.runtime.math.Pose,kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose actual, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose expected, float epsilon)` Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Pose`s are equal. |
| `static final void` | `https://developer.android.com/reference/androidx/xr/runtime/testing/math/MathAssertions#assertRotation(androidx.xr.runtime.math.Quaternion,androidx.xr.runtime.math.Quaternion,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion actual, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion expected, float epsilon )` Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion`s are equal. |
| `static final void` | `https://developer.android.com/reference/androidx/xr/runtime/testing/math/MathAssertions#assertVector3(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Float)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 actual, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 expected, float epsilon )` Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3`s are equal. |

## Public methods

### assertPose

Artifact: [androidx.xr.runtime:runtime-testing](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/testing/math/MathAssertions.kt+function:assertPose) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
public static final void assertPose(@NonNull Pose actual, @NonNull Pose expected, float epsilon)
```

Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Pose`s are equal.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose actual` | the actual `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` to compare |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Pose expected` | the expected `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` to compare |
| `float epsilon` | the maximum difference allowed between the two `https://developer.android.com/reference/androidx/xr/runtime/math/Pose` objects |

### assertRotation

Artifact: [androidx.xr.runtime:runtime-testing](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/testing/math/MathAssertions.kt+function:assertRotation) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
public static final void assertRotation(
    @NonNull Quaternion actual,
    @NonNull Quaternion expected,
    float epsilon
)
```

Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion`s are equal.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion actual` | the actual `https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion` to compare |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion expected` | the expected `https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion` to compare |
| `float epsilon` | the maximum difference allowed between the two `https://developer.android.com/reference/androidx/xr/runtime/math/Quaternion` objects |

### assertVector3

Artifact: [androidx.xr.runtime:runtime-testing](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/testing/math/MathAssertions.kt+function:assertVector3) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
public static final void assertVector3(
    @NonNull Vector3 actual,
    @NonNull Vector3 expected,
    float epsilon
)
```

Asserts that two `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3`s are equal.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 actual` | the actual `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` to compare |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Vector3 expected` | the expected `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` to compare |
| `float epsilon` | the maximum difference allowed between the two `https://developer.android.com/reference/androidx/xr/runtime/math/Vector3` objects |