<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP/polarToRectangular(_:)-jgv8",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4vDSPO18polarToRectangularySaySdGxAA0A6BufferRzSd7ElementRtzlFZ"
  },
  "title" : "polarToRectangular(_:)"
}
-->

# polarToRectangular(_:)

Returns double-precision rectangular coordinates converted from polar coordinates.

```
static func polarToRectangular<U>(_ polarCoordinates: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
```

## Parameters

`polarCoordinates`

The source polar coordinates.

## Discussion

The function calls the underlying [`vDSP_rectD`](/documentation/Accelerate/vDSP_rectD) function to convert the input angle-radius pairs to Cartesian x-y pairs.

The following code shows how to convert an angle-radius pair (with the angle specified in degress) to its rectangular equivalent:

```swift
    let angle = Measurement(value: 45,
                            unit: UnitAngle.degrees)
        .converted(to: UnitAngle.radians)
        .value

    let radius = sqrt(25.0 + 25.0)

    let polarCoordinates = [radius, angle]

    let rectangularCoordinates = vDSP.polarToRectangular(polarCoordinates)
    
    // Prints "[5.0, 5.0]".
    print(rectangularCoordinates)
```

---

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)