---
title: "rotate(by:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/rotatable3d/rotate(by:)-usrg"
---

# rotate(by:)

Rotates the entity by a quaternion.

## Declaration

```swift
mutating func rotate(by quaternion: simd_quatd)
```

## Parameters

- `quaternion`: The double-precision quaternion that specifies the rotation.

## See Also

### Instance methods

- [rotate(by:)](spatial/rotatable3d/rotate(by:)-1g3rl.md)
- [rotated(by:)](spatial/rotatable3d/rotated(by:)-4gdqe.md)
- [rotated(by:)](spatial/rotatable3d/rotated(by:)-7bx4w.md)
