Initializer

init(cgPoint:)

Initializes a vector that is initialized with values provided by a CGPoint structure.

Declaration

convenience init(cgPoint p: CGPoint)

Parameters

p

A point.

Discussion

The CGPoint structure’s X and Y values are stored in the vector’s X and Y properties.

See Also

Initializing a Vector

init(values: UnsafePointer<CGFloat>, count: Int)

Initializes a vector with the provided values.

init(x: CGFloat)

Initializes the first position of a vector with the provided values.

init(x: CGFloat, y: CGFloat)

Initializes the first two positions of a vector with the provided values.

init(x: CGFloat, y: CGFloat, z: CGFloat)

Initializes the first three positions of a vector with the provided values.

init(x: CGFloat, y: CGFloat, z: CGFloat, w: CGFloat)

Initializes four positions of a vector with the provided values.

init(string: String)

Initializes a vector with values provided in a string representation.

init(cgAffineTransform: CGAffineTransform)

Initializes a vector that is initialized with values provided by a CGAffineTransform structure.

init(cgRect: CGRect)

Initializes a vector that is initialized with values provided by a CGRect structure.