# asfloat

> Returns the bit pattern of an int as a float.

## Definition

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

## asfloat(int)

Returns the bit pattern of an int as a float.

```csharp
public static float asfloat(int x)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The int bits to copy.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The float with the same bit pattern as the input. |

## asfloat(int2)

Returns the bit pattern of an int2 as a float2.

```csharp
public static float2 asfloat(int2 x)
```

### Parameters

**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The int2 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float2](/engine/6000.6/script-reference/unity/mathematics/float2.md) | The float2 with the same bit pattern as the input. |

## asfloat(int3)

Returns the bit pattern of an int3 as a float3.

```csharp
public static float3 asfloat(int3 x)
```

### Parameters

**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): The int3 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float3](/engine/6000.6/script-reference/unity/mathematics/float3.md) | The float3 with the same bit pattern as the input. |

## asfloat(int4)

Returns the bit pattern of an int4 as a float4.

```csharp
public static float4 asfloat(int4 x)
```

### Parameters

**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): The int4 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | The float4 with the same bit pattern as the input. |

## asfloat(uint)

Returns the bit pattern of a uint as a float.

```csharp
public static float asfloat(uint x)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The uint bits to copy.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The float with the same bit pattern as the input. |

## asfloat(uint2)

Returns the bit pattern of a uint2 as a float2.

```csharp
public static float2 asfloat(uint2 x)
```

### Parameters

**** (\[uint2]\(/engine/6000.6/script-reference/unity/mathematics/uint2)): The uint2 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float2](/engine/6000.6/script-reference/unity/mathematics/float2.md) | The float2 with the same bit pattern as the input. |

## asfloat(uint3)

Returns the bit pattern of a uint3 as a float3.

```csharp
public static float3 asfloat(uint3 x)
```

### Parameters

**** (\[uint3]\(/engine/6000.6/script-reference/unity/mathematics/uint3)): The uint3 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float3](/engine/6000.6/script-reference/unity/mathematics/float3.md) | The float3 with the same bit pattern as the input. |

## asfloat(uint4)

Returns the bit pattern of a uint4 as a float4.

```csharp
public static float4 asfloat(uint4 x)
```

### Parameters

**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): The uint4 bits to copy.

### Returns

| Type                                                                  | Description                                        |
| --------------------------------------------------------------------- | -------------------------------------------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | The float4 with the same bit pattern as the input. |
