<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Ray3D/rotated(by:around:)-7h43",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So7SPRay3Da7SpatialE7rotated2by6aroundABSo12SPRotation3Da_So9SPPoint3DatF"
  },
  "title" : "rotated(by:around:)"
}
-->

# rotated(by:around:)

Returns a ray that’s rotated by the specified rotation around a specified pivot.

```
func rotated(by rotation: Rotation3D, around pivot: Point3D) -> Ray3D
```

## Parameters

`rotation`

The rotation.

`pivot`

The center of the rotation.

---

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)