Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

scaleQuantize

Constructs a new quantize scale with the specified range. The domain defaults to [0, 1]. If range is not specified, it defaults to [0, 1]. Thus, the default quantize scale is equivalent to the Math.round function.

The range must be set corresponding to the type of the range elements.

The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the unknown value.

function scaleQuantize<Range = number, Unknown = never>(range?: Iterable<Range>): ScaleQuantize<Range, Unknown>;
function scaleQuantize<Range, Unknown = never>(domain: Iterable<NumberValue>, range: Iterable<Range>): ScaleQuantize<Range, Unknown>;
§
scaleQuantize<Range = number, Unknown = never>(range?: Iterable<Range>): ScaleQuantize<Range, Unknown>
[src]

Constructs a new quantize scale with the specified range. The domain defaults to [0, 1]. If range is not specified, it defaults to [0, 1]. Thus, the default quantize scale is equivalent to the Math.round function.

The range must be set corresponding to the type of the range elements.

The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the unknown value.

§Type Parameters

§
Range = number
[src]
§
Unknown = never
[src]

§Parameters

§
range?: Iterable<Range> optional
[src]

Array of range values.

§Return Type

§
ScaleQuantize<Range, Unknown>
[src]
§
scaleQuantize<Range, Unknown = never>(domain: Iterable<NumberValue>, range: Iterable<Range>): ScaleQuantize<Range, Unknown>
[src]

Constructs a new quantize scale with the specified domain and range. Thus, the default quantize scale is equivalent to the Math.round function.

The range must be set corresponding to the type of the range elements.

The first generic corresponds to the data type of the range elements. The second generic corresponds to the data type of the unknown value.

§Type Parameters

§
Range
[src]
§
Unknown = never
[src]

§Parameters

§
domain: Iterable<NumberValue>
[src]

A two-element array of numeric values defining the domain.

§
range: Iterable<Range>
[src]

Array of range values.

§Return Type

§
ScaleQuantize<Range, Unknown>
[src]