Lipi Reference Lipi

Functions

math.round()

Returns the value of number rounded to the nearest integer, with ties rounding up. If the precision parameter is used, returns a float value rounded to that amount of decimal places.

Syntax · 1 of 8

                math.round(const float number) → const int
              

Arguments

number required const float The value to be rounded.

Return Type

const int

Syntax · 2 of 8

                math.round(input float number) → input int
              

Arguments

number required input float The value to be rounded.

Return Type

input int

Syntax · 3 of 8

                math.round(simple float number) → simple int
              

Arguments

number required simple float The value to be rounded.

Return Type

simple int

Syntax · 4 of 8

                math.round(series float number) → series int
              

Arguments

number required series float The value to be rounded.

Return Type

series int

Syntax · 5 of 8

                math.round(const float number, const int precision) → const float
              

Arguments

number required const float The value to be rounded.
precision required const int Optional argument. Decimal places to which number will be rounded. When no argument is supplied, rounding is to the nearest integer.

Return Type

const float

Syntax · 6 of 8

                math.round(input float number, input int precision) → input float
              

Arguments

number required input float The value to be rounded.
precision required input int Optional argument. Decimal places to which number will be rounded. When no argument is supplied, rounding is to the nearest integer.

Return Type

input float

Syntax · 7 of 8

                math.round(simple float number, simple int precision) → simple float
              

Arguments

number required simple float The value to be rounded.
precision required simple int Optional argument. Decimal places to which number will be rounded. When no argument is supplied, rounding is to the nearest integer.

Return Type

simple float

Syntax · 8 of 8

                math.round(series float number, series int precision) → series float
              

Arguments

number required series float The value to be rounded.
precision required series int Optional argument. Decimal places to which number will be rounded. When no argument is supplied, rounding is to the nearest integer.

Return Type

series float