Range

data class Range(lower: Int, upper: Int, step: Int)

This data class models the range of the value a slider can handle.

Parameters

lower

the lower bound of the value; can be negative.

upper

the upper bound of the value; can be negative. But must be greater than lower.

step

defines an optional step size. Must be positive and lower than the difference of upper and lower

Constructors

Range
Link copied to clipboard
js
fun Range(lower: Int = 0, upper: Int = 100, step: Int = 1)
the lower bound of the value; can be negative.

Functions

absolute
Link copied to clipboard
js
fun absolute(value: Int): Int
ranged
Link copied to clipboard
js
fun ranged(value: Int): Int

Properties

distance
Link copied to clipboard
js
val distance: Int
lower
Link copied to clipboard
js
val lower: Int = 0
the lower bound of the value; can be negative.
step
Link copied to clipboard
js
val step: Int = 1
defines an optional step size.
upper
Link copied to clipboard
js
val upper: Int = 100
the upper bound of the value; can be negative.