---
title: "init(x:y:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/unitpoint/init(x:y:)"
---

# init(x:y:)

Creates a unit point with the specified horizontal and vertical offsets.

## Declaration

```swift
init(x: CGFloat, y: CGFloat)
```

## Parameters

- `x`: The normalized distance from the origin to the point in the horizontal direction.
- `y`: The normalized distance from the origin to the point in the vertical direction.

## Discussion

Discussion Values outside the range [0, 1] project to points outside of a view.

## See Also

### Creating a point

- [init()](swiftui/unitpoint/init().md)
