Vector
public protocol Vector
Allows CGPoint, CGSize and CGVector to be approximately interchangable You can do maths with mixed types You can easily convert between them For example: CGPoint() + CGSize() or CGSize() * 3 Extends accessors to apply to all types. So - cgPoint.width or cgSize.x are available
-
Undocumented
Declaration
Swift
var x: CGFloat { get set }
-
Undocumented
Declaration
Swift
var y: CGFloat { get set }
-
height
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
var height: CGFloat { get set }
-
width
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
var width: CGFloat { get set }
-
dx
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
var dx: CGFloat { get set }
-
dy
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
var dy: CGFloat { get set }
-
Undocumented
Declaration
Swift
init(x: CGFloat, y: CGFloat)
-
Undocumented
Declaration
Swift
init(_ vector: Vector)
-
floor()
Default implementationUndocumented
Default Implementation
Round both components down to nearest int
Declaration
Swift
func floor<T>() -> T where T : Vector
-
length
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
var length: CGFloat { get }
-
isPositive
Extension methodUndocumented
Declaration
Swift
var isPositive: Bool { get }
-
init(side:
Extension method) Undocumented
Declaration
Swift
init<T>(side: T) where T : FloatConvertible
-
cgPoint
Extension methodCast to cgPoint
Declaration
Swift
var cgPoint: CGPoint { get }
-
cgSize
Extension methodCast to cgSize
Declaration
Swift
var cgSize: CGSize { get }
-
cgVector
Extension methodcast to cgVector
Declaration
Swift
var cgVector: CGVector { get }