ScalePow<Y>.sqrt constructor
ScalePow<Y>.sqrt ({})
Constructs a new pow scale with the specified domain
, range
and
interpolate
, the exponent
0.5, and clamp
ing disabled.
final x = ScalePow(
domain: [0, 100],
range: ["red", "blue"],
interpolate: interpolateRgb,
)..exponent = 2;
If domain
is not specified, it defaults to [0, 1]. This is a
convenience method equivalent to ScalePow(…)..exponent = 0.5
.
Implementation
ScalePow.sqrt(
{super.domain = const [0, 1],
required super.range,
required super.interpolate}) {
exponent = 0.5;
numberize(identity, identity);
}