---
title: "rotated(by:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/rotatable3dprotocol/rotated(by:)-4mye4"
---

# rotated(by:)

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

## Declaration

```swift
func rotated(by quaternion: Self.Quaternion) -> Self
```

## Parameters

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

## Discussion

Discussion Returns The rotated primitive.
