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
Properties
Max
public double Max { get; }
Property Value
Min
public double Min { get; }
Property Value
Methods
Clamp(double)
Returns the given value clamped to the range (inclusive).
public double Clamp(double value)
Parameters
value
double
Returns
GetRange(IEnumerable<double>)
public static Range GetRange(IEnumerable<double> input)
Parameters
input
IEnumerable<double>
Returns
GetRange(double[,])
public static Range GetRange(double[,] input)
Parameters
input
double[,]
Returns
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
doubleThe value to normalize
clamp
boolIf 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.