Link Search Menu Expand Document

Vector

A structure that contains a two-dimensional vector.

public struct Vector 

Inheritance

CustomDebugStringConvertible

Initializers

init()

Creates a vector whose components are both zero.

public init() 

init(dx:dy:)

Creates a vector with components specified as floating-point values.

public init(dx: Double, dy: Double) 

init(dx:dy:)

Creates a vector with components specified as floating-point values.

public init(dx: Float, dy: Float) 

init(dx:dy:)

Creates a vector with components specified as integer values.

public init(dx: Int, dy: Int) 

Properties

zero

The vector whose components are both zero.

public static var zero: Vector 

dx

The x component of the vector.

public var dx: Double

dy

The y component of the vector.

public var dy: Double

debugDescription

public var debugDescription: String