# Sandbox.Gizmo.Snap

## Overload 1

```csharp
static Vector3 Snap(Vector3 input, Vector3 movement)
```

Will snap this position, depending on the current snap settings and keys that are pressed.
Will snap along if movement is detected along that axis. For example, if movement is 1,0,0 then we'll
only snap on the x axis.

### Parameters

- `input` (`Vector3`)
- `movement` (`Vector3`)

### Returns

`Vector3`

## Overload 2

```csharp
static Vector3 Snap(Vector3 start, Vector3 movement, Rotation space)
```

Snaps a world position to the grid along the given space's local axes. `start`
is the drag origin and `movement` the accumulated delta.

### Parameters

- `start` (`Vector3`)
- `movement` (`Vector3`)
- `space` (`Rotation`)

### Returns

`Vector3`

## Overload 3

```csharp
static Angles Snap(Angles input, Angles movement)
```

Will snap this position, depending on the current snap settings and keys that are pressed.
Will snap along if movement is detected along that axis. For example, if movement is 1,0,0 then we'll
only snap on the x axis.

### Parameters

- `input` (`Angles`)
- `movement` (`Angles`)

### Returns

`Angles`

## Overload 4

```csharp
static Rotation Snap(Rotation rotationDelta)
```

Snaps a rotation delta to angle increments.

### Parameters

- `rotationDelta` (`Rotation`): The rotation delta to snap

### Returns

`Rotation`: A snapped rotation that aligns to the angle grid

## Overload 5

```csharp
static BBox Snap(BBox startBox, BBox movement)
```

Applies snapping to a box being resized using delta tracking. Returns a properly snapped box.

### Parameters

- `startBox` (`BBox`): The original box before resizing began
- `movement` (`BBox`): The accumulated delta changes

### Returns

`BBox`: A new snapped box with proper minimum dimensions

Declared in [Sandbox.Gizmo](/api/Sandbox.Gizmo).
Assembly: `Sandbox.Engine`.
