<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/SpatialTemplateElementDirection/rotatedBy(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Group Activities"
    ],
    "preciseIdentifier" : "s:15GroupActivities31SpatialTemplateElementDirectionV9rotatedByyACSo7SPAngleaF"
  },
  "title" : "rotatedBy(_:)"
}
-->

# rotatedBy(_:)

Returns a new direction structure that adds the specified rotation
angle to the current direction’s value.

```
func rotatedBy(_ rotationAngle: Angle2D) -> SpatialTemplateElementDirection
```

## Parameters

`rotationAngle`

The amount of rotation to apply along the y-axis.

## Return Value

A new direction structure that combines the rotation value of the
current structure and the `rotationAngle` value.

---

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)