---
title: "simd_quaternion(_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/simd_quaternion(_:)-4565s"
---

# simd_quaternion(_:)

## Declaration

```swift
func simd_quaternion(_ xyzr: simd_half4) -> simd_quath
```

## Discussion

Discussion Constructs a quaternion from a four-element vector. Note that the imaginary (vector) part of the quaternion comes from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from lane 3.
