rangeTo

@RequiresApi(value = 21)
infix inline fun <T : Comparable<T>> T.rangeTo(that: T): Range<T>(source)

Creates a range from this Comparable value to that.

Throws

if this value is comparatively smaller than that.