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

# simd_clamp(_:_:_:)

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

## Declaration

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

## See Also

### Common Functions

- [simd_abs(_:)](simd/simd_abs(_:)-477j8.md)
- [simd_equal(_:_:)](simd/simd_equal(_:_:)-5fwh2.md)
