<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Angle2D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@SA@SPAngle"
  },
  "title" : "Angle2D"
}
-->

# Angle2D

A geometric angle with a value you access in either radians or degrees.

```
struct Angle2D
```

## Topics

### Creating an angle structure

[`init()`](/documentation/Spatial/Angle2D/init())

Creates an angle.

[`init(radians:)`](/documentation/Spatial/Angle2D/init(radians:)-3zcwo)

Creates an angle with the specified double-precision radians.

[`init(radians:)`](/documentation/Spatial/Angle2D/init(radians:)-6s7o6)

Creates an angle with the specified double-precision radians.

[`init(radians:)`](/documentation/Spatial/Angle2D/init(radians:)-74ym2)

Creates an angle with the specified floating-point radians.

[`init(degrees:)`](/documentation/Spatial/Angle2D/init(degrees:)-2obd)

Creates an angle with the specified floating-point degrees.

[`init(degrees:)`](/documentation/Spatial/Angle2D/init(degrees:)-7y9lb)

Creates an angle with the specified double-precision degrees.

[`degrees(_:)`](/documentation/Spatial/Angle2D/degrees(_:))

Returns a new angle structure with the specified double-precision degrees.

[`radians(_:)`](/documentation/Spatial/Angle2D/radians(_:))

Returns a new angle structure with the specified double-precision radians.

### Constants

[`SPAngleZero`](/documentation/Spatial/SPAngleZero)

The angle with the zero value.

### Inspecting an angle’s properties

[`degrees`](/documentation/Spatial/Angle2D/degrees)

The angle in degrees.

[`radians`](/documentation/Spatial/Angle2D/radians)

The angle in radians.

### Geometry functions

[`acos(_:)`](/documentation/Spatial/Angle2D/acos(_:))

Returns the inverse cosine of the specified value.

[`acosh(_:)`](/documentation/Spatial/Angle2D/acosh(_:))

Returns the inverse hyperbolic cosine of the specified value.

[`asin(_:)`](/documentation/Spatial/Angle2D/asin(_:))

Returns the inverse sine of the specified value.

[`asinh(_:)`](/documentation/Spatial/Angle2D/asinh(_:))

Returns the inverse hyperbolic sine of the specified value.

[`atan(_:)`](/documentation/Spatial/Angle2D/atan(_:))

Returns the inverse hyperbolic tangent of the specified value.

[`atan2(y:x:)`](/documentation/Spatial/Angle2D/atan2(y:x:))

Returns the two-argument arctangent of the specified values.

[`atanh(_:)`](/documentation/Spatial/Angle2D/atanh(_:))

Returns the inverse hyperbolic tangent of the specified value.

[`normalized`](/documentation/Spatial/Angle2D/normalized)

Returns the specified angle normalized between –180° and 180.0°.

[`SPAngleAcos`](/documentation/Spatial/SPAngleAcos)

Returns the inverse cosine of the specified value.

[`SPAngleAcosh`](/documentation/Spatial/SPAngleAcosh)

Returns the inverse hyperbolic cosine of the specified value.

[`SPAngleAsin`](/documentation/Spatial/SPAngleAsin)

Returns the inverse sine of the specified value.

[`SPAngleAsinh`](/documentation/Spatial/SPAngleAsinh)

Returns the inverse hyperbolic sine of the specified value.

[`SPAngleAtan`](/documentation/Spatial/SPAngleAtan)

Returns the inverse hyperbolic tangent of the specified value.

[`SPAngleAtan2`](/documentation/Spatial/SPAngleAtan2)

Returns the two-argument arctangent of the specified values.

[`SPAngleAtanh`](/documentation/Spatial/SPAngleAtanh)

Returns the hyperbolic tangent of the specified angle.

[`SPAngleCos`](/documentation/Spatial/SPAngleCos)

Returns the cosine of the specified angle.

[`SPAngleCosh`](/documentation/Spatial/SPAngleCosh)

Returns the hyperbolic cosine of the specified angle.

[`SPAngleNormalize`](/documentation/Spatial/SPAngleNormalize)

Returns the specified angle normalized between –180° and 180.0°.

[`SPAngleSin`](/documentation/Spatial/SPAngleSin)

Returns the sine of the specified angle.

[`SPAngleSinh`](/documentation/Spatial/SPAngleSinh)

Returns the hyperbolic sine of the specified angle.

[`SPAngleTan`](/documentation/Spatial/SPAngleTan)

Returns the tangent of the specified angle.

[`SPAngleTanh`](/documentation/Spatial/SPAngleTanh)

Returns the hyperbolic tangent of the specified angle.

### Comparing values

[`==(_:_:)`](/documentation/Spatial/Angle2D/==(_:_:))

Returns a Boolean value that indicates whether two angles are equal.

[`SPAngleEqualToAngle`](/documentation/Spatial/SPAngleEqualToAngle)

Returns a Boolean value that indicates whether two angles are equal.

### Encoding and decoding an angle structure

[`init(from:)`](/documentation/Spatial/Angle2D/init(from:))

Creates a new instance by decoding from the given decoder.

[`encode(to:)`](/documentation/Spatial/Angle2D/encode(to:))

Encodes this value into the given encoder.

### Applying arithmetic operations

[`+(_:)`](/documentation/Spatial/Angle2D/+(_:))

Returns the given angle unchanged.

[`+(_:_:)`](/documentation/Spatial/Angle2D/+(_:_:))

Adds two angles and produces their sum.

[`+=(_:_:)`](/documentation/Spatial/Angle2D/+=(_:_:))

Adds two angles and stores the result in the left-hand-side variable.

[`-(_:)`](/documentation/Spatial/Angle2D/-(_:))

Returns the additive inverse of the given angle.

[`-(_:_:)`](/documentation/Spatial/Angle2D/-(_:_:))

Subtracts one angle from another and produces their difference.

[`-=(_:_:)`](/documentation/Spatial/Angle2D/-=(_:_:))

Subtracts the second angle from the first and stores the difference in the left-hand-side variable.

[`SPAngleNegate`](/documentation/Spatial/SPAngleNegate)

Returns the additive inverse of the given 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)