Skip to main content

Struct UnitRange

Namespace: VelloSharp.Charting.Units
Assembly: VelloSharp.Charting.dll

Represents the physical range corresponding to normalized unit space (0..1).

public readonly record struct UnitRange : IEquatable<UnitRange>

Implements​

IEquatable<UnitRange>

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors​

UnitRange(double, double)​

Represents the physical range corresponding to normalized unit space (0..1).

public UnitRange(double Start, double End)

Parameters​

Start double

End double

Fields​

Normalized​

public static readonly UnitRange Normalized

Field Value​

UnitRange

Properties​

End​

public double End { get; init; }

Property Value​

double

Span​

public double Span { get; }

Property Value​

double

Start​

public double Start { get; init; }

Property Value​

double

Methods​

Clamp(UnitRange)​

public UnitRange Clamp(UnitRange bounds)

Parameters​

bounds UnitRange

Returns​

UnitRange

FromUnit(double)​

public double FromUnit(double unit)

Parameters​

unit double

Returns​

double

Normalize()​

public UnitRange Normalize()

Returns​

UnitRange

ToUnit(double)​

public double ToUnit(double value)

Parameters​

value double

Returns​

double