Link Search Menu Expand Document

Offset

A structure that specifies an amount to offset a position.

public struct Offset 

Inheritance

Equatable

Initializers

init()

public init() 

init(horizontal:vertical:)

public init(horizontal: Double, vertical: Double) 

Properties

horizontal

public private(set) var horizontal: Double

vertical

public private(set) var vertical: Double

zero

A Offset struct whose horizontal and vertical fields are set to the value 0.

public static var zero: Offset 

Methods

string(for:)

Returns a string formatted to contain the data from an offset structure.

public static func string(for offset: Offset) -> String 

offset(for:)

Returns an Offset structure corresponding to the data in a given string.

public static func offset(for string: String) -> Offset 

In general, you should use this function only to convert strings that were

Operators

==

public static func ==(_ lhs: Offset, _ rhs: Offset) -> Bool