<!--
{
  "availability" : [
    "iOS: 9.1.0 -",
    "iPadOS: 9.1.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITouch/azimuthUnitVector(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITouch(im)azimuthUnitVectorInView:"
  },
  "title" : "azimuthUnitVector(in:)"
}
-->

# azimuthUnitVector(in:)

Returns a unit vector that points in the direction of the azimuth of the stylus.

```
func azimuthUnitVector(in view: UIView?) -> CGVector
```

## Parameters

`view`

The view that contains the stylus’s touch. Pass `nil` to get the unit vector for the azimuth that is relative to the touch’s window.

## Return Value

The unit vector that points in the direction of the azimuth of the stylus.

## Discussion

It is less expensive to get the azimuth unit vector than the azimuth angle. If you’re creating transform matrices, the unit vector can also be more useful.

---

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)