---
title: "rotate(by:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/rotatable3dprotocol/rotate(by:)-66sot"
---

# rotate(by:)

Rotates the entity rotated by the specified quaternion around the origin.

## Declaration

```swift
mutating func rotate(by quaternion: Self.Quaternion)
```

## Parameters

- `quaternion`: The quaternion that defines the rotation.
