ClosedFloatingPointRange

An inclusive range whose membership uses floating-point comparison.

Guest Float and Double ranges use IEEE comparison: NaN is never contained, and a NaN bound makes the range empty. Negative and positive zero compare as equal. These ranges do not provide iteration.

Type Parameters

T

the floating-point type of the bounds and tested values.

Properties

Link copied to clipboard
abstract val endInclusive: T

The inclusive upper bound.

Link copied to clipboard
abstract val start: T

The inclusive lower bound.

Functions

Link copied to clipboard
abstract operator fun contains(value: T): Boolean

Tests whether value belongs to this range.

Link copied to clipboard
abstract fun isEmpty(): Boolean

Tests whether this range contains no values.

Link copied to clipboard
abstract fun lessThanOrEquals(left: T, right: T): Boolean

Compares two values using the ordering used by floating-point range membership.