blockly > FieldNumber > setPrecision

FieldNumber.setPrecision() method

Sets the precision of this field's value, i.e. the number to which the value is rounded. Updates the field to reflect.

Signature:

setPrecision(precision: number | string | undefined | null): void;

Parameters

Parameter Type Description
precision number | string | undefined | null The number to which the field's value is rounded.

Returns:

void