<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Rotation3DFloat",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@UA@SPRotation3DFloat"
  },
  "title" : "Rotation3DFloat"
}
-->

# Rotation3DFloat

A single-precision structure that represents a rotation in three dimensions.

```
struct Rotation3DFloat
```

## Topics

### Operators

[`static func * (Rotation3DFloat, Float) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/*(_:_:)-2mmaj)

Calculates the spherical linear interpolation between the identity rotation and the LHS rotation
at the RHS interpolation parameter.

[`static func * (Rotation3DFloat, Rotation3DFloat) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/*(_:_:)-30js8)

Calculates the product of two rotations.

[`static func * (Float, Rotation3DFloat) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/*(_:_:)-99umr)

Calculates the spherical linear interpolation between the identity rotation and the RHS rotation
at the LHS interpolation parameter.

[`static func *= (inout Rotation3DFloat, Rotation3DFloat)`](/documentation/Spatial/Rotation3DFloat/*=(_:_:))

Calculates the product of two rotations and stores the result in the left-hand-side variable.

### Initializers

[`init()`](/documentation/Spatial/Rotation3DFloat/init()-4vjiv)

[`init()`](/documentation/Spatial/Rotation3DFloat/init()-4y09q)

[`init(simd_quatf)`](/documentation/Spatial/Rotation3DFloat/init(_:)-140am)

[`init(simd_quatd)`](/documentation/Spatial/Rotation3DFloat/init(_:)-20sue)

Returns a new rotation from a double-precision quaternion.

[`init(Rotation3D)`](/documentation/Spatial/Rotation3DFloat/init(_:)-5vfv0)

Returns a single-precision rotation from a double-precision rotation.

[`init(simd_packed_float4)`](/documentation/Spatial/Rotation3DFloat/init(_:)-7mhwz)

Creates a Spatial rotation from a simd packed vector.

[`init(angle: Angle2DFloat, axis: RotationAxis3DFloat)`](/documentation/Spatial/Rotation3DFloat/init(angle:axis:))

[`init(eulerAngles: EulerAnglesFloat)`](/documentation/Spatial/Rotation3DFloat/init(eulerAngles:))

[`init(forward: Vector3DFloat)`](/documentation/Spatial/Rotation3DFloat/init(forward:))

Returns a rotation with the specified forward vector.

[`init(forward: Vector3DFloat, up: Vector3DFloat)`](/documentation/Spatial/Rotation3DFloat/init(forward:up:))

[`init(position: Point3DFloat, target: Point3DFloat, up: Vector3DFloat)`](/documentation/Spatial/Rotation3DFloat/init(position:target:up:))

Returns a rotation that’s the look at direction from the eye position to the target.

[`init(quaternion: simd_quatf)`](/documentation/Spatial/Rotation3DFloat/init(quaternion:))

### Instance Properties

[`var angle: Angle2DFloat`](/documentation/Spatial/Rotation3DFloat/angle)

The angle of the rotation.

[`var axis: RotationAxis3DFloat`](/documentation/Spatial/Rotation3DFloat/axis)

The axis of the rotation.

[`var inverse: Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/inverse)

[`var isIdentity: Bool`](/documentation/Spatial/Rotation3DFloat/isIdentity)

[`var quaternion: simd_quatf`](/documentation/Spatial/Rotation3DFloat/quaternion)

[`var vector: simd_float4`](/documentation/Spatial/Rotation3DFloat/vector)

### Instance Methods

[`func eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesFloat`](/documentation/Spatial/Rotation3DFloat/eulerAngles(order:))

[`func isApproximatelyEqual(to: Rotation3DFloat, tolerance: Float) -> Bool`](/documentation/Spatial/Rotation3DFloat/isApproximatelyEqual(to:tolerance:))

Returns a Boolean value that indicates whether two rotations are equal within a specified tolerance.

[`func swing(twistAxis: RotationAxis3DFloat) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/swing(twistAxis:))

[`func swingTwist(twistAxis: RotationAxis3DFloat) -> (swing: Rotation3DFloat, twist: Rotation3DFloat)`](/documentation/Spatial/Rotation3DFloat/swingTwist(twistAxis:))

Returns the rotation’s swing-twist decomposition for a given twist axis.

[`func twist(twistAxis: RotationAxis3DFloat) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/twist(twistAxis:))

### Type Properties

[`static let identity: Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/identity)

A single-precision structure that represents a rotation in three dimensions.

### Type Methods

[`static func slerp(from: Rotation3DFloat, to: Rotation3DFloat, t: Float, along: Rotation3D.SlerpPath) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/slerp(from:to:t:along:))

Returns the spherical linear interpolation along the either the shortest or longest arc
between two rotations.

[`static func spline(leftEndpoint: Rotation3DFloat, from: Rotation3DFloat, to: Rotation3DFloat, rightEndpoint: Rotation3DFloat, t: Float) -> Rotation3DFloat`](/documentation/Spatial/Rotation3DFloat/spline(leftEndpoint:from:to:rightEndpoint:t:))

Returns an interpolated value between two rotations along a spherical cubic spline.

### Default Implementations

[CustomReflectable Implementations](/documentation/Spatial/Rotation3DFloat/CustomReflectable-Implementations)

[Decodable Implementations](/documentation/Spatial/Rotation3DFloat/Decodable-Implementations)

[Encodable Implementations](/documentation/Spatial/Rotation3DFloat/Encodable-Implementations)

[Equatable Implementations](/documentation/Spatial/Rotation3DFloat/Equatable-Implementations)

[Hashable Implementations](/documentation/Spatial/Rotation3DFloat/Hashable-Implementations)

[ProjectiveTransformable3DFloat Implementations](/documentation/Spatial/Rotation3DFloat/ProjectiveTransformable3DFloat-Implementations)

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`Decodable`](/documentation/Swift/Decodable)

[`Hashable`](/documentation/Swift/Hashable)

[`Copyable`](/documentation/Swift/Copyable)

[`Encodable`](/documentation/Swift/Encodable)

[`ProjectiveTransformable3DFloat`](/documentation/Spatial/ProjectiveTransformable3DFloat)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`ProjectiveTransformable3D`](/documentation/Spatial/ProjectiveTransformable3D)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Rotatable3DProtocol`](/documentation/Spatial/Rotatable3DProtocol)

[`SpatialTypeProtocol`](/documentation/Spatial/SpatialTypeProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)