Skip to main content

Home > 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

ParameterTypeDescription
precisionnumber | string | undefined | nullThe number to which the field's value is rounded.

Returns:

void