Scale<T> class

Represents a scale with minimum, maximum and length.

Implementers
Available Extensions

Constructors

Scale(T minimum, T maximum, [T? length])

Properties

hashCode int
The hash code for this object.
no setterinherited
length → T
The length of the scale: maximum - minimum.
no setter
maximum → T
The maximum value of the scale.
final
maximumNice → T
Same as maximum but as a nice number.
no setter
minimum → T
The minimum value of the scale.
final
minimumNice → T
Same as minimum but as a nice number.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clip(T value) → T
Clips value in this scale.
clipList(Iterable<T> list) List<T>
Clips a list.
computeLength(T maximum, T minimum) → T
Computes the length: maximum - minimum.
denormalize(double valueNormalized) → T
Denormalizes a valueNormalized from range 0..1 to this scale.
denormalizeList(Iterable<double> list) List<T>
Denormalizes a list.
normalize(T value) double
Normalizes a value to range 0..1.
normalizeList(Iterable<T> list) List<double>
Normalizes a list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toNum(T value) num?
Converts a value to num.
toString() String
A string representation of this object.
inherited
toValue(Object? value) → T
Converts a value to T.
valuesType() Type

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

from<T>(Iterable? list) Scale?