LineDivisible

public protocol LineDivisible : LineMultiplicative where Self.Vector : VectorDivisible

Protocol for objects that form geometric lines with two VectorDivisible vectors representing two points on the line.

  • Alias for Vector.Scalar.

    Declaration

    Swift

    typealias Magnitude = Vector.Scalar
  • projectAsScalar(_:) Default implementation

    Performs a vector projection of a given vector with respect to this line, returning a scalar value representing the normalized magnitude of the projected point between a <-> b.

    By multiplying the result of this function by (b - a) and adding a, the projected point as it lays on this line can be obtained.

    Seealso

    projectedNormalizedMagnitude(_:)-vyrp

    Default Implementation

    Declaration

    Swift

    func projectAsScalar(_ vector: Vector) -> Magnitude