# AddSat(int, int)

> Atomically adds a value to this counter. The result will not be greater than a maximum value.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public int AddSat(int value, int max = 2147483647)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The value to add to this counter.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The maximum which the result will not be greater than.

### Returns

| Type                                                       | Description                        |
| ---------------------------------------------------------- | ---------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The original value before the add. |
