Polygon

public struct Polygon
extension Polygon: CustomPlaygroundDisplayConvertible

Undocumented

Contains point check

  • Check if the polygon contains a point

    Declaration

    Swift

    public func contains(_ point: Point, onLine: Bool) -> Bool

    Parameters

    point

    The point to check

    onLine

    true if the contains check should succeed when the point is right on the edge of the polygon

    Return Value

    Whether the polygon contains the point

  • Declaration

    Swift

    public var playgroundDescription: Any { get }