LineAdditive

public protocol LineAdditive : LineType where Self.Vector : VectorAdditive

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

  • lineSlope Default implementation

    Gets the slope of this line, or the vector that represents b - a.

    Default Implementation

    Declaration

    Swift

    var lineSlope: Vector { get }
  • Returns a new line with the same slope, but with the end-points shifted by vector.

    Declaration

    Swift

    func offsetBy(_ vector: Vector) -> Self