AbstractRange

abstract class AbstractRange(val minVal: Double, val maxVal: Double) : IRange

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

Since

1.0.0

Author

Matthias Kovacic

Throws

If minVal or maxVal is NaN

Inheritors

Constructors

Link copied to clipboard
constructor(minVal: Double, maxVal: Double)

Properties

Link copied to clipboard

The maximum value of the range.

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
abstract fun difference(range: IRange): List<IRange>

Get the difference of this range and the given range.

Link copied to clipboard
abstract fun intersection(range: IRange): IRange

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
abstract fun union(range: IRange): IRange

Get the union of this range and the given range.