Point
public struct Point
extension Point: Equatable
A structure that contains a point in a two-dimensional coordinate system.
-
The x-coordinate of the point.
Declaration
Swift
public var x: Int
-
The y-coordinate of the point.
Declaration
Swift
public var y: Int
-
Creates a point with specified coordinates.
Declaration
Swift
public init(x: Int, y: Int)
Parameters
x
The x-coordinate of the point
y
The y-coordinate of the point
-
The point at the origin (0,0).
Declaration
Swift
public static let zero: Point
-
Creates a point with specified coordinates.
Declaration
Swift
public init(x: Int32, y: Int32)
Parameters
x
The x-coordinate of the point
y
The y-coordinate of the point
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
public static func == (lhs: Point, rhs: Point) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.