# asulong

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

## Definition

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

## asulong(long)

Returns the bit pattern of a long as a ulong.

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

### Parameters

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

### Returns

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

## asulong(double)

Returns the bit pattern of a double as a ulong.

```csharp
public static ulong asulong(double x)
```

### Parameters

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

### Returns

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