<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDValue/Vec2f",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDValueV5Vec2fV"
  },
  "title" : "USDValue.Vec2f"
}
-->

# USDValue.Vec2f

A 2-component single-precision vector.

```
@frozen struct Vec2f
```

## Topics

### Initializers

[`init()`](/documentation/USDKit/USDValue/Vec2f/init())

Creates a zero vector.

[`init(SIMD2<Float>)`](/documentation/USDKit/USDValue/Vec2f/init(_:))

Creates a vector from a `SIMD2<Float>`.

[`init(Float, Float)`](/documentation/USDKit/USDValue/Vec2f/init(_:_:))

Creates a vector with the given components.

### Instance Properties

[`var simd: SIMD2<Float>`](/documentation/USDKit/USDValue/Vec2f/simd)

The vector as a `SIMD2<Float>`.

[`var x: Float`](/documentation/USDKit/USDValue/Vec2f/x)

[`var y: Float`](/documentation/USDKit/USDValue/Vec2f/y)

### Subscripts

[`subscript(Int) -> Float`](/documentation/USDKit/USDValue/Vec2f/subscript(_:))

Accesses the component at the specified index.

## Relationships

### Conforms To

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

[`USDValueProtocol`](/documentation/USDKit/USDValueProtocol)

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

[`MetadataValue`](/documentation/USDKit/USDStage/Object/MetadataValue)

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

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

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

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

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

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

[`Value`](/documentation/USDKit/USDPrim/Attribute/Value)

---

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)