# Vector2.AddClamped

```csharp
Vector2 AddClamped(in Vector2 toAdd, float maxLength)
```

Try to add to this vector. If we're already over max then don't add.
If we're over max when we add, clamp in that direction so we're not.

### Parameters

- `in toAdd` (`Vector2`)
- `maxLength` (`float`)

### Returns

`Vector2`

Declared in [Vector2](/api/Vector2).
Assembly: `Sandbox.System`.
