# Rotation.Clamp

## Overload 1

```csharp
Rotation Clamp(Rotation to, float degrees)
```

Clamp to within degrees of passed rotation

### Parameters

- `to` (`Rotation`)
- `degrees` (`float`)

### Returns

`Rotation`

## Overload 2

```csharp
Rotation Clamp(Rotation to, float degrees, out float change)
```

Clamp to within degrees of passed rotation. Also pases out the change in degrees, if any.

### Parameters

- `to` (`Rotation`)
- `degrees` (`float`)
- `out change` (`float`)

### Returns

`Rotation`

Declared in [Rotation](/api/Rotation).
Assembly: `Sandbox.System`.
