frost.core

Class Range<T:Value?>

    └ Value
         └ Immutable
             └ Object

Represents a range between two values. Range contains a min, max, and flag to determine inclusive vs. exclusive ranges; the inclusive flag is understood to refer to the max endpoint only, with min always being included in the Range.

The exclusive range (..) and inclusive range (...) operators in Frost provide a shorthand syntax for creating Range and SteppedRange objects.

Source Code:
View Source

Initializer Summary

init(min:T, max:T, inclusive:Bit):Range<T>
Creates a new Range.

Field Summary

min:T
The range's starting point.
max:T
The range's ending point.
inclusive:Bit
true if the range includes its maximum value.
Inherited Fields:

Initializers

init (min:T,
 max:T,
 inclusive:Bit
):Range<T>

Creates a new Range.

Parameters:
min - value of type T
max - value of type T
inclusive - value of type Bit

Fields

def min:T

The range's starting point.

def max:T

The range's ending point.

def inclusive:Bit

true if the range includes its maximum value.