Range

class Range(val min: Double, val max: Double) : AbstractRange

Represents a range of values between min (inclusive) and max (exclusive).

Since

1.0.0

Author

Matthias Kovacic

Constructors

Link copied to clipboard
constructor(min: Double, max: Double)

Properties

Link copied to clipboard
val max: Double
Link copied to clipboard

The maximum value of the range.

Link copied to clipboard
val min: Double
Link copied to clipboard

The minimum value of the range.

Functions

Link copied to clipboard
open operator fun contains(range: AbstractRange): Boolean

Returns true if the range contains the range.

open operator fun contains(value: Double): Boolean

Returns true if the range contains the value.

Link copied to clipboard
open override fun difference(range: IRange): List<Range>

Get the difference of this range and the given range.

Link copied to clipboard
open override fun intersection(range: IRange): Range

Get the intersection of this range and the given range.

Link copied to clipboard

Returns true if this range is a subset of the given range in terms of min and max values.

Link copied to clipboard

Returns true if this range is a superset of the given range in terms of min and max values.

Link copied to clipboard

Returns true if this range overlaps the given range in terms of min and max values.

fun overlaps(value: Double): Boolean

Returns true if this range overlaps the given value.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun union(range: IRange): Range

Get the union of this range and the given range.