Line

public struct Line : Equatable, Hashable

Segment defined between two points.

  • Undocumented

    Declaration

    Swift

    public init(from p1: Point, to p2: Point)
  • Undocumented

    Declaration

    Swift

    public init(x1: Double, y1: Double, x2: Double, y2: Double)
  • p1

    Undocumented

    Declaration

    Swift

    public var p1: Point
  • x1

    Undocumented

    Declaration

    Swift

    public var x1: Double { get }
  • y1

    Undocumented

    Declaration

    Swift

    public var y1: Double { get }
  • x2

    Undocumented

    Declaration

    Swift

    public var x2: Double { get }
  • y2

    Undocumented

    Declaration

    Swift

    public var y2: Double { get }
  • Undocumented

    Declaration

    Swift

    public var isHorizontal: Bool { get }
  • Undocumented

    Declaration

    Swift

    public var isVertical: Bool { get }
  • Computes the length of the line segment.

    Declaration

    Swift

    public var length: Double { get }