Contents

relative(to:)

Returns Range for the dimension.

Declaration

func relative(to dimension: Range<Int>) -> Range<Int>

Parameters

  • dimension:

    The dimension of the axis on which the range expression is used.

Return Value

The range of the selected dimension.

Discussion

For example, when the range expression specifies 1... on the axis with dimension 3, the resultant Range is 1 ..< 3.