Function

advance(by:)

Returns self offset by the given amount.

Source
fun advance(by offset: ???) -> Self

Details

The absolute value of offset is the distance between self and the returned value. If offset is positive or negative, the returned value is greater or lesser then self, respectively. Otherwise, the returned value is equal to self.

Complexity

O(1).