Point
public struct Point : Equatable
Fondamental element in Euclidean geometry
Points, considered within the framework of Euclidean geometry, are one of the most fundamental objects. Euclid originally defined the point as “that which has no part”. In two-dimensional Euclidean space, a point is represented by an ordered pair (x, y) of numbers, where the first number conventionally represents the horizontal and is often denoted by x, and the second number conventionally represents the vertical and is often denoted by y. This idea is easily generalized to three-dimensional Euclidean space, where a point is represented by an ordered triplet (x, y, z) with the additional third number representing depth and often denoted by z. Further generalizations are represented by an ordered tuplet of n terms, (a1, a2, … , an) where n is the dimension of the space in which the point is located.
-
X-coordinate of the point
Declaration
Swift
public var x: BigDouble -
Y-coordinate of the point
Declaration
Swift
public var y: BigDouble -
X, Y and higher dimensions
Declaration
Swift
public var dims: [BigDouble] -
Simple 2D Point
Parameters
xX coordinate
yY coordinate
-
Simple 1D Point
Declaration
Swift
public init(x: BigDouble)Parameters
xX coordinate
-
Point in more than 2 dimensions
Declaration
Swift
public init(multipleDimensions: [BigDouble])Parameters
multipleDimensionsAn containing the coordinates:
[x, y, z, ...] -
Equality between points
Declaration
Swift
public static func == (rhs: Point, lhs: Point) -> Bool
View on GitHub
Point Structure Reference