Skip to main content

Interface IScale<T>

Namespace: VelloSharp.Charting.Scales
Assembly: VelloSharp.Charting.dll

Represents a scale that projects domain values into normalized unit space and can unproject back.

public interface IScale<T> : IScale

Type Parameters​

T

Domain data type.

Implements​

IScale

Properties​

Domain​

Gets the scale domain range.

Range<T> Domain { get; }

Property Value​

Range<T>

Methods​

Project(T)​

Projects the provided value into normalized unit space (0..1).

double Project(T value)

Parameters​

value T

Returns​

double

TryProject(T, out double)​

Attempts to project the provided value into unit space without throwing.

bool TryProject(T value, out double unit)

Parameters​

value T

unit double

Returns​

bool

Unproject(double)​

Converts a normalized unit value back into domain space.

T Unproject(double unit)

Parameters​

unit double

Returns​

T