One Logo Pool Ball
Vision · IOS API REFERENCE

VNVector

class · iOS 14.0+ · SDK 27.1

class VNVector

Members (15)

static · iOS 14.0+

dotProduct

TypeScript
static dotProduct(v1: VNVector, v2: VNVector): number
Swift declaration
class func dotProduct(of v1: VNVector, vector v2: VNVector) -> Double
static · iOS 14.0+

unitVector

TypeScript
static unitVector(vector: VNVector): VNVector
Swift declaration
class func unitVector(for vector: VNVector) -> VNVector
init · iOS 14.0+

init

TypeScript
static initByAddingTo(v1: VNVector, v2: VNVector): VNVector
Swift declaration
init(byAdding v1: VNVector, to v2: VNVector)
init · iOS 14.0+

init

TypeScript
static initByMultiplyingByScalar(vector: VNVector, scalar: number): VNVector
Swift declaration
init(byMultiplying vector: VNVector, byScalar scalar: Double)
init · iOS 14.0+

init

TypeScript
static initBySubtractingFrom(v1: VNVector, v2: VNVector): VNVector
Swift declaration
init(bySubtracting v1: VNVector, from v2: VNVector)
get · iOS 14.0+

zero

TypeScript
static get zero(): VNVector
Swift declaration
class var zero: VNVector { get }
init · iOS 14.0+

init

TypeScript
static initRTheta(r: number, theta: number): VNVector
Swift declaration
convenience init(r: Double, theta: Double)
init · iOS 14.0+

init

TypeScript
static initVectorHeadTail(head: VNPoint, tail: VNPoint): VNVector
Swift declaration
convenience init(vectorHead head: VNPoint, tail: VNPoint)
init · iOS 14.0+

init

TypeScript
static initXComponentYComponent(x: number, y: number): VNVector
Swift declaration
init(xComponent x: Double, yComponent y: Double)
get · iOS 14.0+

length

TypeScript
get length(): number
Swift declaration
var length: Double { get }
get · iOS 14.0+

r

TypeScript
get r(): number
Swift declaration
var r: Double { get }
get · iOS 14.0+

squaredLength

TypeScript
get squaredLength(): number
Swift declaration
var squaredLength: Double { get }
get · iOS 14.0+

theta

TypeScript
get theta(): number
Swift declaration
var theta: Double { get }
get · iOS 14.0+

x

TypeScript
get x(): number
Swift declaration
var x: Double { get }
get · iOS 14.0+

y

TypeScript
get y(): number
Swift declaration
var y: Double { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

VNVector.init()

inherited init: cannot prove legal (class declares 10 custom initializers)

All Vision types →