# operator ==

> Returns the result of a componentwise equality operation on two half2 vectors.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.Mathematics](/engine/6000.7/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## operator ==(half2, half2)

Returns the result of a componentwise equality operation on two half2 vectors.

```csharp
public static bool2 operator ==(half2 lhs, half2 rhs)
```

### Parameters

**** (\[half2]\(/engine/6000.7/script-reference/unity/mathematics/half2)): Left hand side half2 to use to compute componentwise equality.**** (\[half2]\(/engine/6000.7/script-reference/unity/mathematics/half2)): Right hand side half2 to use to compute componentwise equality.

### Returns

| Type                                                                | Description                                 |
| ------------------------------------------------------------------- | ------------------------------------------- |
| [bool2](/engine/6000.7/script-reference/unity/mathematics/bool2.md) | bool2 result of the componentwise equality. |

## operator ==(half2, half)

Returns the result of a componentwise equality operation on a half2 vector and a half value.

```csharp
public static bool2 operator ==(half2 lhs, half rhs)
```

### Parameters

**** (\[half2]\(/engine/6000.7/script-reference/unity/mathematics/half2)): Left hand side half2 to use to compute componentwise equality.**** (\[half]\(/engine/6000.7/script-reference/unity/mathematics/half)): Right hand side half to use to compute componentwise equality.

### Returns

| Type                                                                | Description                                 |
| ------------------------------------------------------------------- | ------------------------------------------- |
| [bool2](/engine/6000.7/script-reference/unity/mathematics/bool2.md) | bool2 result of the componentwise equality. |

## operator ==(half, half2)

Returns the result of a componentwise equality operation on a half value and a half2 vector.

```csharp
public static bool2 operator ==(half lhs, half2 rhs)
```

### Parameters

**** (\[half]\(/engine/6000.7/script-reference/unity/mathematics/half)): Left hand side half to use to compute componentwise equality.**** (\[half2]\(/engine/6000.7/script-reference/unity/mathematics/half2)): Right hand side half2 to use to compute componentwise equality.

### Returns

| Type                                                                | Description                                 |
| ------------------------------------------------------------------- | ------------------------------------------- |
| [bool2](/engine/6000.7/script-reference/unity/mathematics/bool2.md) | bool2 result of the componentwise equality. |
