<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/SIMD2/init(_:rounding:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s5SIMD2Vss17FixedWidthIntegerRzrlE_8roundingAByxGAByqd__G_s25FloatingPointRoundingRuleOtcSBRd__s10SIMDScalarRd__lufc"
  },
  "title" : "init(_:rounding:)"
}
-->

# init(_:rounding:)

Creates a new vector from the given vector, rounding the given vector’s
of elements using the specified rounding rule.

```
init<Other>(_ other: SIMD2<Other>, rounding rule: FloatingPointRoundingRule = .towardZero) where Other : BinaryFloatingPoint, Other : SIMDScalar
```

## Parameters

`other`

The vector to convert.

`rule`

The round rule to use when converting elements of `other.` The
default is `.towardZero`.

---

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)