<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCQuaternion/init(x:y:z:w:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "s:So12GCQuaternionV1x1y1z1wABSd_S3dtcfc"
  },
  "title" : "init(x:y:z:w:)"
}
-->

# init(x:y:z:w:)

Creates a quaternion structure with the specified values.

```
init(x: Double, y: Double, z: Double, w: Double)
```

## Parameters

`x`

The value for the x-axis.

`y`

The value for the y-axis.

`z`

The value for the z-axis.

`w`

The value for the w-axis.

---

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)