Structures

The following structures are available globally.

  • A 2-dimensional vector representing a size.

    See more

    Declaration

    Swift

    public struct SizeBase<VectorType> where VectorType : Addable
  • An iterator that iterates over pairs of elements in firstSequence and secondSequence. secondSequence must not destructively consume its contents.

    For example, the first element generated is (firstSequence[0], secondSequence[0]), the second element is (firstSequence[0], secondSequence[1]), all the way to (firstSequence[0]. secondSequence.last), at which point the next element is (firstSequence[1], secondSequence[0]).

    for (x, y) in pairs(firstSequence, secondSequence) {
        //...
    }
    

    is equivalent to

    for x in firstSequence {
        for y in secondSequence {
            //...
        }
    }
    
    See more

    Declaration

    Swift

    public struct PairIterator<T, U> : Sequence, IteratorProtocol where T : Sequence, U : Sequence
  • A 2-dimensional vector.

    See more

    Declaration

    Swift

    public struct PointBase<VectorType> where VectorType : Addable
  • A 4-dimensional vector representing a rectangle. A rectangle contains an origin (point) and dimensions (size). The dimensions of size must be non-negative.

    See more

    Declaration

    Swift

    public struct RectBase<VectorType> where VectorType : Addable