<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SquareAzimuth/init(closestToAzimuth:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13SquareAzimuthO09closestToD0AcA5AngleV_tcfc"
  },
  "title" : "init(closestToAzimuth:)"
}
-->

# init(closestToAzimuth:)

Creates a [`SquareAzimuth`](/documentation/SwiftUI/SquareAzimuth) case with an orientation that has a horizontal
angle closest to the provided azimuth.

```
init(closestToAzimuth azimuth: Angle)
```

---

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)