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
x
Desired x coordinate
y
Desired y coordinate
-
A
point
with 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