---
title: Equals
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/quaternion4/equals
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/quaternion4/equals.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:31:34.378Z
locale: en-us
---

# Equals

> Returns true if the components of this quaternion4 equal those of another quaternion4.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

## Equals(quaternion4)

Returns true if the components of this quaternion4 equal those of another quaternion4.

```csharp
public bool Equals(quaternion4 q)
```

### Parameters

**** (\[quaternion4]\(/engine/7000.0/script-reference/unity/animations/quaternion4)): The [quaternion4](/engine/7000.0/script-reference/unity/animations/quaternion4.md) to compare with this one.

### Returns

| Type                                                          | Description                                                |
| ------------------------------------------------------------- | ---------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if all 16 components are equal. Otherwise, `false`. |

### Remarks

The comparison is exact. It doesn't use a tolerance, and it doesn't treat `q` and its negation as the same rotation.

## Equals(Object)

Determines whether this [quaternion4](/engine/7000.0/script-reference/unity/animations/quaternion4.md) equals another object.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed object")]
public override bool Equals(object o)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to compare with this one.

### Returns

| Type                                                          | Description                                                                                                                                                                                                                 |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if `o` is a [quaternion4](/engine/7000.0/script-reference/unity/animations/quaternion4.md) whose 16 components are all equal to those of this one. Otherwise, `false`, including when `o` is another type or `null`. |
