<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Vector3D/init(x:y:z:)-2ejxw",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So10SPVector3Da7SpatialE1x1y1zABSd_S2dtcfc"
  },
  "title" : "init(x:y:z:)"
}
-->

# init(x:y:z:)

Creates a vector from the specified double-precision values.

```
init(x: Double = 0, y: Double = 0, z: Double = 0)
```

## Parameters

`x`

A double-precision value that specifies the x value.

`y`

A double-precision value that specifies the y value.

`z`

A double-precision value that specifies the z value.

---

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)