# explicit operator half

> Explicitly converts a float value to a half value.

## Definition

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

## explicit operator half(hal)

Explicitly converts a float value to a half value.

```csharp
public static explicit operator half(float v)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The single precision float value to convert to half.

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [half](/engine/6000.6/script-reference/unity/mathematics/half.md) | The converted half value. |

## explicit operator half(hal)

Explicitly converts a double value to a half value.

```csharp
public static explicit operator half(double v)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The double precision float value to convert to half.

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [half](/engine/6000.6/script-reference/unity/mathematics/half.md) | The converted half value. |
