# aslong

> Returns the bit pattern of a ulong as a long.

## Definition

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

## aslong(ulong)

Returns the bit pattern of a ulong as a long.

```csharp
public static long aslong(ulong x)
```

### Parameters

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

### Returns

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

## aslong(double)

Returns the bit pattern of a double as a long.

```csharp
public static long aslong(double x)
```

### Parameters

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

### Returns

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