---
title: "rotated(by:)"
framework: spatial
role: symbol
role_heading: Instance Method
path: "spatial/vector3dfloat/rotated(by:)-56jvg"
---

# rotated(by:)

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

## Declaration

```swift
func rotated(by quaternion: simd_quatf) -> Vector3DFloat
```

## Parameters

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

## Discussion

Discussion Returns The rotated vector.
