<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/clamp(_:min:max:)-59rk7",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "s:4simd5clamp_3min3maxs5SIMD2Vys6UInt32VGAI_A2ItF"
  },
  "title" : "clamp(_:min:max:)"
}
-->

# clamp(_:min:max:)

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

```
func clamp(_ x: SIMD2<UInt32>, min: SIMD2<UInt32>, max: SIMD2<UInt32>) -> SIMD2<UInt32>
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)