Range

data class Range(val range: ClosedRange<Float>) : Levels

The entity spans a range of levels.

Constructors

Link copied to clipboard
constructor(range: ClosedRange<Float>)

Properties

Link copied to clipboard

Returns true if the value is Outdoor.

Link copied to clipboard

Returns true if the value is Range.

Link copied to clipboard

Returns true if the value is Single.

Link copied to clipboard
Link copied to clipboard

The single level value: the level for Single, the lower bound for Range, null for Outdoor.

Functions

Link copied to clipboard
fun contains(other: Levels): Boolean

Returns true if a level is contained in another level.

Link copied to clipboard
fun diff(other: Levels): Float?

Returns the level difference between the current level and another level.

Link copied to clipboard

Returns the level of intersection between the current level and another level.

Link copied to clipboard

Returns true if a level intersects another one.

Link copied to clipboard
fun toList(): List<Float>

Returns the level(s) as a list: empty for Outdoor, one value for Single, two bounds for Range.

Link copied to clipboard
fun union(other: Levels): Levels

Returns the union of the current level and another level.