Skip to content

ChartBinRange<T>

StructChartGuruChartGuru
public readonly struct ChartBinRange<T> where T : IComparable<T>

Range used to describe a histogram bin. Mirrors Swift Charts' ChartBinRange. Open-bound flags let callers express half-open intervals (the Swift convention is lower-closed / upper-open, except for the final bin which is closed on both sides).

public readonly T LowerBound

Returns

{T}

public readonly T UpperBound

Returns

{T}

public readonly bool IsLowerOpen

Returns

System.Boolean

public readonly bool IsUpperOpen

Returns

System.Boolean

public ChartBinRange(T lower, T upper, bool isLowerOpen = false, bool isUpperOpen = true)

Creates an interval with independently inclusive or exclusive lower and upper boundaries.

Parameters

NameType
lower{T}
upper{T}
isLowerOpenSystem.Boolean
isUpperOpenSystem.Boolean

public bool Contains(T value)

Reports whether the value lies within both boundaries, honoring their open or closed state.

Parameters

NameType
value{T}

Returns

System.Boolean

public bool Equals(ChartBinRange<T> other)

Parameters

NameType
otherChartGuru.ChartBinRange`1

Returns

System.Boolean

public override bool Equals(object obj)

Parameters

NameType
objSystem.Object

Returns

System.Boolean

public override int GetHashCode()

Returns

System.Int32