Point
public struct Point<N> : Equatable, CustomStringConvertible where N : Numeric
The Point generic captures a single in space.
-
The x coordinate of the point
Declaration
Swift
public var x: N -
The y coordinate of the point
Declaration
Swift
public var y: N -
Creates a new instance of a point from the given parameters
Declaration
Swift
public init(x: N, y: N)Parameters
xDesired x coordinate
yDesired y coordinate
-
A
pointwith x and y equal to 0Declaration
Swift
public static var zero: `Self` { get } -
The description of the point
Declaration
Swift
public var description: String { get }
-
Undocumented
Declaration
Swift
func distance(to p2: Point<N>) -> N
View on GitHub
Point Structure Reference