---
title: "atan2(y:x:)"
framework: spatial
role: symbol
role_heading: Type Method
path: "spatial/angle2d/atan2(y:x:)"
---

# atan2(y:x:)

Returns the two-argument arctangent of the specified values.

## Declaration

```swift
static func atan2(y: Double, x: Double) -> Angle2D
```

## Parameters

- `y`: The source y value.
- `x`: The source z value

## See Also

### Geometry functions

- [acos(_:)](spatial/angle2d/acos(_:).md)
- [acosh(_:)](spatial/angle2d/acosh(_:).md)
- [asin(_:)](spatial/angle2d/asin(_:).md)
- [asinh(_:)](spatial/angle2d/asinh(_:).md)
- [atan(_:)](spatial/angle2d/atan(_:).md)
- [atanh(_:)](spatial/angle2d/atanh(_:).md)
- [normalized](spatial/angle2d/normalized.md)
