Table of Contents

Struct Range

Namespace
ScottPlot
Assembly
ScottPlot.dll

Represents a range between any two finite values (inclusive)

public readonly struct Range
Inherited Members
Extension Methods

Constructors

Range(double, double)

public Range(double min, double max)

Parameters

min double
max double

Properties

Max

public double Max { get; }

Property Value

double

Min

public double Min { get; }

Property Value

double

Methods

Clamp(double)

Returns the given value clamped to the range (inclusive).

public double Clamp(double value)

Parameters

value double

Returns

double

GetRange(IEnumerable<double>)

public static Range GetRange(IEnumerable<double> input)

Parameters

input IEnumerable<double>

Returns

Range

GetRange(double[,])

public static Range GetRange(double[,] input)

Parameters

input double[,]

Returns

Range

Normalize(double, bool)

Returns the given value as a fraction of the difference between Min and Max. This is a min-max feature scaling.

public double Normalize(double value, bool clamp = false)

Parameters

value double

The value to normalize

clamp bool

If true, values outside of the range will be clamped onto the interval [0, 1].

Returns

double

The normalized value

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.