---
title: "clamp(to:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/point3d/clamp(to:)"
---

# clamp(to:)

Clamps the mutable point to the specified rectangle.

## Declaration

```swift
mutating func clamp(to rect: Rect3D)
```

## Parameters

- `rect`: The rectangle structure that defines the clamp volume.

## See Also

### Transforming a 3D point structure

- [applying(_:)](spatial/point3d/applying(_:)-1f4em.md)
- [applying(_:)](spatial/point3d/applying(_:)-1f4em.md)
- [applying(_:)](spatial/point3d/applying(_:)-7ulww.md)
- [scale(by:)](spatial/point3d/scale(by:).md)
- [rotated(by:around:)](spatial/point3d/rotated(by:around:)-4tmfq.md)
- [rotated(by:around:)](spatial/point3d/rotated(by:around:)-chuy.md)
- [unapplying(_:)](spatial/point3d/unapplying(_:)-5hk6t.md)
- [unapplying(_:)](spatial/point3d/unapplying(_:)-7wdtv.md)
- [unapplying(_:)](spatial/point3d/unapplying(_:)-7wdtv.md)
