NumberFormat.tryRound

Syntax

PP.NumberFormat.tryRound (value);

Parameters

value. Fractional number.

Description

The tryRound method rounds fractional numbers.

Example

To execute the example the page must contain a link to PP.js library. Use the tryRound method to round a fractional number:

PP.NumberFormat.tryRound (1,234);

Result:

1

NOTE. This method rounds only the numbers that use a comma as decimal separator.

See also:

NumberFormat