# Vector2.ClampLength

## Overload 1

```csharp
Vector2 ClampLength(float maxLength)
```

Returns a vector whose length is limited to given maximum

### Parameters

- `maxLength` (`float`)

### Returns

`Vector2`

## Overload 2

```csharp
Vector2 ClampLength(float minLength, float maxLength)
```

Returns a vector whose length is limited between given minimum and maximum

### Parameters

- `minLength` (`float`)
- `maxLength` (`float`)

### Returns

`Vector2`

Declared in [Vector2](/api/Vector2).
Assembly: `Sandbox.System`.
