<!--
{
  "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/Vector3DFloat",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@UA@SPVector3DFloat"
  },
  "title" : "Vector3DFloat"
}
-->

# Vector3DFloat

A single-precision structure that defines a three-element vector

```
struct Vector3DFloat
```

## Topics

### Operators

[`static func * (Pose3DFloat, Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/*(_:_:)-1nqw7)

Returns the vector that results from applying the pose to the vector.

[`static func * (ProjectiveTransform3DFloat, Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/*(_:_:)-39da3)

Returns the vector that results from applying the transform to the vector.

[`static func * (Vector3DFloat, Float) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/*(_:_:)-5f6x6)

Returns the vector that’s the element-wise product of a vector and a scalar value.

[`static func * (Float, Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/*(_:_:)-77n9y)

Returns the vector that’s the element-wise product of a scalar value and a vector.

[`static func * (AffineTransform3DFloat, Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/*(_:_:)-86gx9)

Returns the vector that results from applying the transform to the vector.

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

Calculates the vector that’s the element-wise product of a vector and a scalar value and stores the result in the left-hand-side variable.

[`static func + (Point3DFloat, Vector3DFloat) -> Point3DFloat`](/documentation/Spatial/Vector3DFloat/+(_:_:)-1l8zf)

Returns the point that’s the element-wise sum of a point and a vector.

[`static func + (Vector3DFloat, Point3DFloat) -> Point3DFloat`](/documentation/Spatial/Vector3DFloat/+(_:_:)-1wtkv)

Returns the point that’s the element-wise sum of a vector and a point.

[`static func + (Size3DFloat, Vector3DFloat) -> Size3DFloat`](/documentation/Spatial/Vector3DFloat/+(_:_:)-2l7re)

Returns the size that’s the element-wise sum of a size and a vector.

[`static func + (Vector3DFloat, Size3DFloat) -> Size3DFloat`](/documentation/Spatial/Vector3DFloat/+(_:_:)-94qrx)

Returns the size that’s the element-wise sum of a vector and a size.

[`static func - (Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/-(_:))

Returns the vector that’s the element-wise negation of the vector.

[`static func - (Vector3DFloat, Size3DFloat) -> Size3DFloat`](/documentation/Spatial/Vector3DFloat/-(_:_:)-115el)

Returns the size that’s the element-wise difference of a vector and a size.

[`static func - (Size3DFloat, Vector3DFloat) -> Size3DFloat`](/documentation/Spatial/Vector3DFloat/-(_:_:)-5qy45)

Returns the size that’s the element-wise difference of a size and a vector.

[`static func - (Vector3DFloat, Point3DFloat) -> Point3DFloat`](/documentation/Spatial/Vector3DFloat/-(_:_:)-7h9bz)

Returns the point that’s the element-wise difference of a vector and a point.

[`static func - (Point3DFloat, Vector3DFloat) -> Point3DFloat`](/documentation/Spatial/Vector3DFloat/-(_:_:)-8k83d)

Returns the point that’s the element-wise difference of a point and a vector.

[`static func / (Vector3DFloat, Float) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/_(_:_:))

Returns the vector that’s the element-wise division of a vector and a scalar value.

[`static func /= (inout Vector3DFloat, Float)`](/documentation/Spatial/Vector3DFloat/_=(_:_:))

Calculates the vector that’s the element-wise division of a vector and a scalar value and stores the result in the left-hand-side variable.

### Initializers

[`init()`](/documentation/Spatial/Vector3DFloat/init())

[`init(RotationAxis3DFloat)`](/documentation/Spatial/Vector3DFloat/init(_:)-13p20)

Returns a new vector from a rotation axis.

[`init(simd_packed_float4)`](/documentation/Spatial/Vector3DFloat/init(_:)-1w9o5)

Creates a Spatial vector from a simd packed vector.

[`init(Point3DFloat)`](/documentation/Spatial/Vector3DFloat/init(_:)-217dp)

Returns a new vector from a point.

[`init(simd_double3)`](/documentation/Spatial/Vector3DFloat/init(_:)-2qtq8)

Returns a vector point from a single-precision vector.

[`init(simd_float3)`](/documentation/Spatial/Vector3DFloat/init(_:)-3c8f6)

Returns a new vector from a single-precision vector.

[`init(SphericalCoordinates3DFloat)`](/documentation/Spatial/Vector3DFloat/init(_:)-4svr4)

Creates a new vector structure that contains the spherical coordinates converted to Cartesian coordinates.

[`init(Vector3D)`](/documentation/Spatial/Vector3DFloat/init(_:)-538j2)

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

[`init(Size3DFloat)`](/documentation/Spatial/Vector3DFloat/init(_:)-7y4t0)

Returns a new vector from a size.

[`init(vector: simd_float3)`](/documentation/Spatial/Vector3DFloat/init(vector:))

[`init<T>(x: T, y: T, z: T)`](/documentation/Spatial/Vector3DFloat/init(x:y:z:)-1h79g)

Returns a new vector from the doubleing-point values.

[`init(x: Float, y: Float, z: Float)`](/documentation/Spatial/Vector3DFloat/init(x:y:z:)-8dkie)

Returns a vector from the specified values.

### Instance Properties

[`var length: Float`](/documentation/Spatial/Vector3DFloat/length)

[`var lengthSquared: Float`](/documentation/Spatial/Vector3DFloat/lengthSquared)

[`var normalized: Vector3DFloat`](/documentation/Spatial/Vector3DFloat/normalized)

Returns this vector with a length of `1`.

[`var vector: simd_float3`](/documentation/Spatial/Vector3DFloat/vector)

[`var x: Float`](/documentation/Spatial/Vector3DFloat/x)

[`var y: Float`](/documentation/Spatial/Vector3DFloat/y)

[`var z: Float`](/documentation/Spatial/Vector3DFloat/z)

### Instance Methods

[`func applying(ScaledPose3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/applying(_:)-3mahk)

Returns the primitive that results from applying a scaled pose to the primitive.

[`func cross(Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/cross(_:))

Returns the cross product of this vector and the specified vector.

[`func dot(Vector3DFloat) -> Float`](/documentation/Spatial/Vector3DFloat/dot(_:))

Returns the dot product of this vector and the specified vector.

[`func normalize()`](/documentation/Spatial/Vector3DFloat/normalize())

Normalizes the vector.

[`func projected(Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/projected(_:))

Returns this vector projected onto the specified vector.

[`func reflected(Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/reflected(_:))

Returns the reflection direction of this incident vector and the specified unit normal vector.

[`func rotation(to: Vector3DFloat) -> Rotation3DFloat`](/documentation/Spatial/Vector3DFloat/rotation(to:))

Returns the rotation from the normalized first vector to the normalized second vector.

[`func sheared(AxisWithFactors) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/sheared(_:))

Returns a sheared vector.

[`func unapplying(ScaledPose3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/unapplying(_:)-9dwm2)

Returns the primitive that results from unapplying a scaled pose to the primitive.

### Type Properties

[`static let forward: Vector3DFloat`](/documentation/Spatial/Vector3DFloat/forward)

A vector with values `[0, 0, 1]`.

[`static let right: Vector3DFloat`](/documentation/Spatial/Vector3DFloat/right)

A vector with values `[1, 0, 0]`.

[`static let up: Vector3DFloat`](/documentation/Spatial/Vector3DFloat/up)

A vector with values `[0, 1, 0]`.

### Type Methods

[`static func lerp(from: Vector3DFloat, to: Vector3DFloat, t: Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/lerp(from:to:t:))

Returns a Spatial vector that represents the linear interpolation at `t` between two vectors.

[`static func smoothstep(edge0: Vector3DFloat, edge1: Vector3DFloat, x: Vector3DFloat) -> Vector3DFloat`](/documentation/Spatial/Vector3DFloat/smoothstep(edge0:edge1:x:))

Returns a Spatial vector that represents the smooth interpolation at `x` between two vectors.

### Default Implementations

[AdditiveArithmetic Implementations](/documentation/Spatial/Vector3DFloat/AdditiveArithmetic-Implementations)

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

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

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

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

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

[Primitive3DProtocol Implementations](/documentation/Spatial/Vector3DFloat/Primitive3DProtocol-Implementations)

[Rotatable3DProtocol Implementations](/documentation/Spatial/Vector3DFloat/Rotatable3DProtocol-Implementations)

[Scalable3DProtocol Implementations](/documentation/Spatial/Vector3DFloat/Scalable3DProtocol-Implementations)

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

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

[`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)