Interval

class Interval(a: Double, b: Double)(source)

Represents a mathematical interval defined by a lower bound (lo) and an upper bound (hi). Provides various operations and utilities to manipulate and query intervals.

Parameters

a

The first boundary of the interval.

b

The second boundary of the interval.

Constructors

Link copied to clipboard
constructor(a: Double, b: Double)

Initializes an Interval instance using two double values. The lowest value becomes lo, and the highest value becomes hi.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var hi: Double

The upper bound of the interval.

Link copied to clipboard
Link copied to clipboard
var lo: Double

The lower bound of the interval.

Functions

Link copied to clipboard
Link copied to clipboard
operator fun contains(n: Double): Boolean
operator fun contains(i: Interval): Boolean
Link copied to clipboard
operator fun div(i: Interval): Interval

Divides the current interval by the given interval and returns the resulting interval. Division is computed by multiplying the current interval by the reciprocal of the given interval.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun size(): Double
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard