Line3FloatingPoint

public protocol Line3FloatingPoint : Line3Type, LineFloatingPoint where Self.SubLine2 : Line2FloatingPoint

Protocol for 3D line types where the vectors are floating-point vectors.

  • Returns a pair of unclamped, normalized magnitudes, on self and other, where the magnitudes when projected on each line result in a pair of points that form the shortest line between the two original lines.

    Returns nil for parallel lines, and for any line where a == b.

    Default Implementation

    Declaration

    Swift

    func unclampedNormalizedMagnitudesForShortestLine<Line: LineFloatingPoint>(
        to other: Line
    ) -> (onSelf: Vector.Scalar, onOther: Vector.Scalar)? where Line.Vector == Vector
  • shortestLine(to:) Default implementation

    Returns the shortest line segment between the points of this line to another 3D line.

    Default Implementation

    Declaration

    Swift

    func shortestLine<Line>(to other: Line) -> LineSegment<Vector>? where Line : LineFloatingPoint, Self.Vector == Line.Vector