# explicit operator float4

> Explicitly converts a single bool value to a float4 vector by converting it to float and assigning it to every component.

## Definition

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

## explicit operator float4(float)

Explicitly converts a single bool value to a float4 vector by converting it to float and assigning it to every component.

```csharp
public static explicit operator float4(bool v)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): bool to convert to float4

### Returns

| Type                                                                  | Description      |
| --------------------------------------------------------------------- | ---------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | Converted value. |

## explicit operator float4(float)

Explicitly converts a bool4 vector to a float4 vector by componentwise conversion.

```csharp
public static explicit operator float4(bool4 v)
```

### Parameters

**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): bool4 to convert to float4

### Returns

| Type                                                                  | Description      |
| --------------------------------------------------------------------- | ---------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | Converted value. |

## explicit operator float4(float)

Explicitly converts a single double value to a float4 vector by converting it to float and assigning it to every component.

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

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): double to convert to float4

### Returns

| Type                                                                  | Description      |
| --------------------------------------------------------------------- | ---------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | Converted value. |

## explicit operator float4(float)

Explicitly converts a double4 vector to a float4 vector by componentwise conversion.

```csharp
public static explicit operator float4(double4 v)
```

### Parameters

**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): double4 to convert to float4

### Returns

| Type                                                                  | Description      |
| --------------------------------------------------------------------- | ---------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | Converted value. |
