# `GSNormalizeAngleDirection`

*Function*

Returns a version of the angle that matches the given direction.

## Declaration

```swift
func GSNormalizeAngleDirection(_ angle: CGFloat, _ direction: GSRotationDirection) -> CGFloat
```

```objc
CGFloat GSNormalizeAngleDirection(CGFloat angle, GSRotationDirection direction);
```

```python
GSNormalizeAngleDirection(angle: float, direction: GSRotationDirection) -> float
```

## Parameters

- `angle` — An angle in arc degree.
- `direction` — The direction in which to normalize the angle. If `GSRotationDirectionSmallestAngle`, the return value is in the interval (-180, 180]. If `GSRotationDirectionClockwise`, the return value is in the interval (-360, 0]. If `GSRotationDirectionCounterclockwise`, the return value is in the interval [0, 360).

## See Also

### Angles and Slopes

- [`GSNormalizeAngleRAD`](/Core/GlyphsCore/GSNormalizeAngleRAD) — Returns a value in the interval [0, 2π).
- [`GSNormalizeAngleDEG`](/Core/GlyphsCore/GSNormalizeAngleDEG) — Returns a value in the interval [0, 360).
- [`GSSlope`](/Core/GlyphsCore/GSSlope)

