---
title: "init(x:y:z:)"
framework: spatial
role: symbol
role_heading: Initializer
path: "spatial/vector3d/init(x:y:z:)-2ejxw"
---

# init(x:y:z:)

Creates a vector from the specified double-precision values.

## Declaration

```swift
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.

## See Also

### Creating a vector

- [init()](spatial/vector3d/init().md)
- [init(x:y:z:)](spatial/vector3d/init(x:y:z:)-29hwg.md)
- [init(_:)](spatial/vector3d/init(_:)-73gdm.md)
- [init(_:)](spatial/vector3d/init(_:)-1a9i3.md)
- [init(vector:)](spatial/vector3d/init(vector:).md)
- [init(_:)](spatial/vector3d/init(_:)-3br9h.md)
- [init(_:)](spatial/vector3d/init(_:)-8vcph.md)
- [init(_:)](spatial/vector3d/init(_:)-8egfs.md)
- [init(_:)](spatial/vector3d/init(_:)-9ker1.md)
