---
title: "init(clamping:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/simd32/init(clamping:)"
---

# init(clamping:)

Creates a new vector from the given vector, clamping the values of the given vector’s elements if necessary.

## Declaration

```swift
init<Other>(clamping other: SIMD32<Other>) where Other : FixedWidthInteger, Other : SIMDScalar
```

## Parameters

- `other`: The vector to convert.
