Convex2Type
public protocol Convex2Type : GeometricType
Protocol for 2D geometric types defined by floating-point vectors that form closed convex shapes.
-
The floating-point vector type associated with this
Convex2Type
.Declaration
Swift
associatedtype Vector : Vector2FloatingPoint
-
Performs an intersection test against the given line, returning up to two points representing the entrance and exit intersections against this convex shape’s outer perimeter.
Declaration
Swift
func intersection<Line>(with line: Line) -> ConvexLineIntersection<Vector> where Line : Line2FloatingPoint, Self.Vector == Line.Vector