One Logo Pool Ball
USDKit · IOS API REFERENCE

USDValue.Vec2h

struct · iOS 27.0+ · SDK 27.1

@frozen struct Vec2h

A 2-component half-precision vector.

Members (10)

get · iOS 27.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 27.0+

x

TypeScript
get x(): number
Swift declaration
var x: Float16 { get set }
set · iOS 27.0+

x

TypeScript
set x(value: number)
Swift declaration
var x: Float16 { get set }
get · iOS 27.0+

y

TypeScript
get y(): number
Swift declaration
var y: Float16 { get set }
set · iOS 27.0+

y

TypeScript
set y(value: number)
Swift declaration
var y: Float16 { get set }
get · iOS 27.0+

simd

TypeScript
get simd(): SDKHandle
Swift declaration
var simd: SIMD2<Float16> { get }

The vector as a `SIMD2<Float16>`.

get · iOS 27.0+

valueType

TypeScript
static get valueType(): USDPrim_Attribute_ValueType
Swift declaration
static var valueType: USDPrim.Attribute.ValueType { get }
init · iOS 27.0+

init

TypeScript
static init(): USDValue_Vec2h
Swift declaration
init()

Creates a zero vector.

init · iOS 27.0+

init

TypeScript
static init16805(x: number, y: number): USDValue_Vec2h
Swift declaration
init(_ x: Float16, _ y: Float16)

Creates a vector with the given components.

subscript · iOS 27.0+

subscript

TypeScript
subscript(index: number): number
Swift declaration
subscript(index: Int) -> Float16 { get set }

Accesses the component at the specified index.

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →