MUQuad

public struct MUQuad

A Quadrilateral

  • Top left corner position.

    Declaration

    Swift

    public var topLeft: CGPoint
  • Top right corner position.

    Declaration

    Swift

    public var topRight: CGPoint
  • Bottom left corner position.

    Declaration

    Swift

    public var bottomLeft: CGPoint
  • Bottom right corner position.

    Declaration

    Swift

    public var bottomRight: CGPoint
  • Init a quad from corners.

    Declaration

    Swift

    public init(topLeft: CGPoint, topRight: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint)
  • Init a quad from a rectangle.

    Declaration

    Swift

    public init(rect: CGRect)
  • The bounds rectangle, which the quad fit inside.

    Declaration

    Swift

    public var boundingBox: CGRect { get }
  • Get corners from index, clockwise starting from topLeft corner.

    Declaration

    Swift

    public func point(_ index: Int) -> CGPoint
    • operator for Quad and Point

    Declaration

    Swift

    public static func + (lhs: MUQuad, rhs: CGPoint) -> MUQuad
    • operator for Quad and Point

    Declaration

    Swift

    public static func - (lhs: MUQuad, rhs: CGPoint) -> MUQuad
  • operator for Quad and Point

    Declaration

    Swift

    public static func * (lhs: MUQuad, rhs: CGPoint) -> MUQuad
  • / operator for Quad and Point

    Declaration

    Swift

    public static func / (lhs: MUQuad, rhs: CGPoint) -> MUQuad