---
title: "simd_clamp(_:_:_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/simd_clamp(_:_:_:)-4jo2y"
---

# simd_clamp(_:_:_:)

Returns each element in a vector clamped to a specified range.

## Declaration

```swift
func simd_clamp(_ x: simd_int8, _ min: simd_int8, _ max: simd_int8) -> simd_int8
```

## See Also

### Common Functions

- [simd_abs(_:)](simd/simd_abs(_:)-7os48.md)
- [simd_equal(_:_:)](simd/simd_equal(_:_:)-ojy5.md)
