Struct CoordinateRange
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
Represents a range of values between a pair of bounding coordinates on a single axis. Inverted ranges are permitted, but Min is always less than Max and IsInverted indicates whether this range is inverted.
public readonly struct CoordinateRange
- Inherited Members
- Extension Methods
Constructors
CoordinateRange(double, double)
Represents a range of values between a pair of bounding coordinates on a single axis. Inverted ranges are permitted, but Min is always less than Max and IsInverted indicates whether this range is inverted.
public CoordinateRange(double value1, double value2)
Parameters
Fields
IsInverted
public readonly bool IsInverted
Field Value
Max
public readonly double Max
Field Value
Min
public readonly double Min
Field Value
Value1
public readonly double Value1
Field Value
Value2
public readonly double Value2
Field Value
Properties
Center
public double Center { get; }
Property Value
Length
public double Length { get; }
Property Value
NoLimits
This magic value is used to indicate the range has no defined limits. It is equal to an inverted infinite range [NaN, NaN]
public static CoordinateRange NoLimits { get; }
Property Value
NotSet
This magic value is used to indicate the range has not been set. It is equal to an inverted infinite range [∞, -∞]
public static CoordinateRange NotSet { get; }
Property Value
Span
public double Span { get; }
Property Value
Methods
Contains(double)
Returns true if the given position is within the range (inclusive)
public bool Contains(double value)
Parameters
value
double
Returns
Equals(CoordinateRange)
public bool Equals(CoordinateRange other)
Parameters
other
CoordinateRange
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
Expanded(double)
Return a new range expanded to include the given point
public CoordinateRange Expanded(double value)
Parameters
value
double
Returns
Extrema(IEnumerable<double>)
Return the range of values spanned by the given collection (ignoring NaN)
public static CoordinateRange Extrema(IEnumerable<double> values)
Parameters
values
IEnumerable<double>
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Overlaps(CoordinateRange)
Indicates whether two ranges have any overlapping values
public bool Overlaps(CoordinateRange other)
Parameters
other
CoordinateRange
Returns
Rectified()
public CoordinateRange Rectified()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(CoordinateRange, CoordinateRange)
public static bool operator ==(CoordinateRange a, CoordinateRange b)
Parameters
Returns
operator !=(CoordinateRange, CoordinateRange)
public static bool operator !=(CoordinateRange a, CoordinateRange b)