Point

public struct Point : Equatable, Hashable

Point defined by X and Y coordinates.

  • Undocumented

    Declaration

    Swift

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

    Undocumented

    Declaration

    Swift

    public var x: Double
  • Undocumented

    Declaration

    Swift

    public static let origin: Point
  • Returns a point obtained by translation.

    Declaration

    Swift

    public func movedBy(dx: Double = 0, dy: Double = 0) -> Point
  • 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
  • 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
  • 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
  • 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
  • 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
  • Computes the mathematical distance from the point to a line segment.

    Declaration

    Swift

    public func distance(to line: Line) -> Double
  • Computes the mathematical distance from the point to another point.

    Declaration

    Swift

    public func distance(to point: Point) -> Double
  • Undocumented

    Declaration

    Swift

    init(_ source: CGPoint)
  • Undocumented

    Declaration

    Swift

    init?(_ source: CGPoint?)