Interval:
Filter:
Classes | Math

Interval : Collection : Object

range of integers
Source: Interval.sc

Description

An Interval is a range of integers from a starting value to an ending value by some step value.

Class Methods

Interval.new(start, end, step: 1)

Create a new Interval.

Inherited class methods

Instance Methods

.start

.start = value

The starting value of the interval.

.end

.end = value

The ending value of the interval.

.step

.step = value

The step value of the interval.

.size

Return the number of items in the interval.

.at(index)

Return the indexed item in the interval.

.do(function)

Evaluates function for each item in the interval. The function is passed two arguments, the item and an integer index.

Inherited instance methods

Undocumented instance methods

.add

.clipAt(index)

.put

.wrapAt(index)