Line2Signed

public protocol Line2Signed : Line2Multiplicative, LineSigned where Self.Vector : Vector2Signed

Protocol for 2D line types where the vectors are signed vectors.

  • isCollinear(with:tolerance:) Default implementation

    Returns true if this line is colinear with a given point, up to a given tolerance of their cross-product check.

    Default Implementation

    Declaration

    Swift

    func isCollinear(with point: Vector, tolerance: Vector.Scalar) -> Bool
  • Returns true if this line is colinear with a given line, up to a given tolerance of their cross-product check.

    Declaration

    Swift

    func isCollinear<Line: Line2Signed>(
        with line: Line,
        tolerance: Vector.Scalar
    ) -> Bool where Line.Vector == Vector