---
title: "rotated(by:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/vector3d/rotated(by:)-8bwna"
---

# rotated(by:)

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

## Declaration

```swift
func rotated(by quaternion: simd_quatd) -> Vector3D
```

## Parameters

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

## Discussion

Discussion Returns The rotated vector.

## See Also

### Transforming a vector

- [applying(_:)](spatial/vector3d/applying(_:)-1d0mh.md)
- [applying(_:)](spatial/vector3d/applying(_:)-5y3xb.md)
- [applying(_:)](spatial/vector3d/applying(_:)-4k2qi.md)
- [unapplying(_:)](spatial/vector3d/unapplying(_:)-6vl3o.md)
- [unapplying(_:)](spatial/vector3d/unapplying(_:)-8ookb.md)
- [unapplying(_:)](spatial/vector3d/unapplying(_:)-1gzyd.md)
- [rotated(by:)](spatial/vector3d/rotated(by:)-2gcq4.md)
- [scaled(by:)](spatial/vector3d/scaled(by:).md)
- [scaledBy(x:y:z:)](spatial/vector3d/scaledby(x:y:z:).md)
- [uniformlyScaled(by:)](spatial/vector3d/uniformlyscaled(by:).md)
- [sheared(_:)](spatial/vector3d/sheared(_:).md)
- [applying(_:)](spatial/vector3d/applying(_:)-8fn6a.md)
- [unapplying(_:)](spatial/vector3d/unapplying(_:)-4uxr2.md)
