Method reference

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

  • public init(_ point: CGPoint)

    construct a point from a CGPoint

  • public func distanceToPoint(point: Point) -> Double

    returns the distance to another point (not the point calling this method…)

  • Convenience methods

  • public func ==(a: Point, b: Point) -> Bool

  • public func +(a: Point, b: Point) -> Point

  • public func +=(inout a: Point, b: Point)

  • public func -(a: Point, b: Point) -> Point

  • public func -=(inout a: Point, b: Point)

  • public func *(a: Point, scalar: Double) -> Point

  • public func *=(inout a: Point, scalar: Double)

  • public func /(a: Point, scalar: Double) -> Point

  • public func /=(inout a: Point, scalar: Double)

  • Variables

  • public var x: Double

  • public var y: Double

  • public var length: Double