# `GSNode roundToGrid:`

*Instance Method*

Rounds the position to a grid.

## Declaration

```swift
func round(toGrid grid: GSGridSettings)
```

```objc
- (void) roundToGrid:(GSGridSettings) grid;
```

```python
roundToGrid_(grid: GSGridSettings)
```

## Parameters

- `grid` — The grid settings used to round the position.

## Discussion

The unrounded position remains unchanged.

## See Also

### Position

- [`GSNode.position`](/Core/GlyphsCore/GSNode/position) — The position in layer coordinates.
- [`GSNode positionForLayerWidth:`](/Core/GlyphsCore/GSNode/positionForLayerWidth:) — The position in layer coordinates for a layer width.
- [`GSNode setPosition:forLayerWidth:`](/Core/GlyphsCore/GSNode/setPosition:forLayerWidth:) — Sets the position in layer coordinates for a layer width.
- [`GSNode.positionFast`](/Core/GlyphsCore/GSNode/positionFast) — The position without orientation adjustment.
- [`GSNode setPositionFast:`](/Core/GlyphsCore/GSNode/setPositionFast:) — Sets the position without registering undo or notifying the path.
- [`GSNode setPositionFast:grid:`](/Core/GlyphsCore/GSNode/setPositionFast:grid:) — Sets the unrounded position and rounds the position to a grid without registering undo or notifying the path.
- [`GSNode.positionPrecise`](/Core/GlyphsCore/GSNode/positionPrecise) — The unrounded position in layer coordinates.
- [`GSNode positionPreciseForLayerWidth:`](/Core/GlyphsCore/GSNode/positionPreciseForLayerWidth:) — The unrounded position in layer coordinates for a layer width.
- [`GSNode positionPreciseFast`](/Core/GlyphsCore/GSNode/positionPreciseFast) — The unrounded position without orientation adjustment.
- [`GSNode roundToGridFast:`](/Core/GlyphsCore/GSNode/roundToGridFast:) — Rounds the position to a grid without registering undo or notifying the path.

