# Point

``public struct Point : Equatable, Hashable``

Point defined by X and Y coordinates.

• ``` init(x:y:) ```

Undocumented

#### Declaration

Swift

``public init(x: Double = 0, y: Double = 0)``
• ``` x ```

Undocumented

#### Declaration

Swift

``public var x: Double``
• ``` origin ```

Undocumented

#### Declaration

Swift

``public static let origin: Point``
• ``` movedBy(dx:dy:) ```

Returns a point obtained by translation.

#### Declaration

Swift

``public func movedBy(dx: Double = 0, dy: Double = 0) -> Point``
• ``` isContained(in:) ```

Determines whether the point is contained within a specific rectangle. Rectangle limits (top-left and bottom-right) are considered to be part of the container area.

#### Declaration

Swift

``public func isContained(in rectangle: Rectangle) -> Bool``
• ``` isClose(to:maxDx:maxDy:) ```

Determines whether the point is close to a specific rectangle, being within the rectangle itself or at a minimal distance away from any of its sides.

#### Declaration

Swift

``public func isClose(to rectangle: Rectangle, maxDx: Double, maxDy: Double) -> Bool``
• ``` isClose(to:maxDistance:) ```

Determines whether the point is close to a specific polyline, being at a minimal distance away from any of its segments.

#### Declaration

Swift

``public func isClose(to polyline: Polyline, maxDistance: Double) -> Bool``
• ``` isClose(to:maxDistance:) ```

Determines whether the point is close to a specific line segment, being at a minimal distance away from it.

#### Declaration

Swift

``public func isClose(to line: Line, maxDistance: Double) -> Bool``
• ``` isClose(to:maxDistance:) ```

Determines whether the point is close to a specific other point, being at a minimal distance away from it.

#### Declaration

Swift

``public func isClose(to point: Point, maxDistance: Double) -> Bool``
• ``` distance(to:) ```

Computes the mathematical distance from the point to a line segment.

#### Declaration

Swift

``public func distance(to line: Line) -> Double``
• ``` distance(to:) ```

Computes the mathematical distance from the point to another point.

#### Declaration

Swift

``public func distance(to point: Point) -> Double``
• ``` init(_:) ```

Undocumented

#### Declaration

Swift

``init(_ source: NSPoint)``
• ``` init(_:) ```

Undocumented

#### Declaration

Swift

``init?(_ source: NSPoint?)``