public final class

DoubleRange

extends Object
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.DoubleRange

Class Overview

Represents double range class used to identify range of two double values.

Summary

Fields
public final double Maximum Represents ending value of range.
public final double Minimum Represents starting value of range.
Public Constructors
DoubleRange(double min, double max)
Initializes a new instance of DoubleRange class with specified parameters.
Public Methods
double center()
Gets the center value of this range.
double extrapolate(double value)
Extrapolates value to this range.
double getDelta()
Gets the difference between start and end values.
double interpolate(double value)
Interpolates value on this range.
DoubleRange union(DoubleRange range)
Extends range with specified one.
static DoubleRange union(DoubleRange range1, DoubleRange range2)
Joins both ranges to single one.
DoubleRange union(double value)
Extends the range that it includes specified value.
DoubleRange union(double min, double max)
Extends range with specified max and min values.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final double Maximum

Represents ending value of range.

See Also

public final double Minimum

Represents starting value of range.

See Also

Public Constructors

public DoubleRange (double min, double max)

Initializes a new instance of DoubleRange class with specified parameters. If max < min, values are swapped automatically.

Parameters
min starting range value.
max ending range value.
See Also

Public Methods

public double center ()

Gets the center value of this range.

Returns
  • center of range value.

public double extrapolate (double value)

Extrapolates value to this range.

Parameters
value to extrapolate.
Returns
  • extrapolated value.

public double getDelta ()

Gets the difference between start and end values.

Returns
  • difference that range represents.

public double interpolate (double value)

Interpolates value on this range.

Parameters
value value to interpolate.
Returns
  • interpolated value.

public DoubleRange union (DoubleRange range)

Extends range with specified one.

Parameters
range extending range.
Returns

public static DoubleRange union (DoubleRange range1, DoubleRange range2)

Joins both ranges to single one.

Parameters
range1 first range to join.
range2 second range to join.
Returns
  • instance of DoubleRange that includes both specified ranges.

public DoubleRange union (double value)

Extends the range that it includes specified value.

Parameters
value value that is to be included to range.
Returns

public DoubleRange union (double min, double max)

Extends range with specified max and min values.

Parameters
min staring value of extending range.
max ending value of extending range.
Returns