Rounding Type

Rounding of numbers

Constructors

Constructor Description

Rounding()

Full Usage: Rounding()

Static members

Static member Description

Rounding.RoundDown(i, n)

Full Usage: Rounding.RoundDown(i, n)

Parameters:
    i : int - The number to round down.
    n : int - The rounding step.

Returns: int

This returns the next number k with k lesser or equal i, and k mod n == 0.

i : int

The number to round down.

n : int

The rounding step.

Returns: int

Rounding.RoundDown(i, n)

Full Usage: Rounding.RoundDown(i, n)

Parameters:
    i : int64 - The number to round down.
    n : int64 - The rounding step.

Returns: int64

This returns the next number k with k lesser or equal i, and k mod n == 0.

i : int64

The number to round down.

n : int64

The rounding step.

Returns: int64

Rounding.RoundToNumberOfSignificantDigits(x, significantDigits, rounding)

Full Usage: Rounding.RoundToNumberOfSignificantDigits(x, significantDigits, rounding)

Parameters:
    x : float - The value to round.
    significantDigits : int - The number of significant digits.
    rounding : MidpointRounding - The rounding rule that should be applied.

Returns: float The number, rounded to the provided number of significant digits.

Rounds a double number to the provided number of significant digits.

x : float

The value to round.

significantDigits : int

The number of significant digits.

rounding : MidpointRounding

The rounding rule that should be applied.

Returns: float

The number, rounded to the provided number of significant digits.

Rounding.RoundUp(i, n)

Full Usage: Rounding.RoundUp(i, n)

Parameters:
    i : int - The number to round up.
    n : int - The rounding step.

Returns: int

This returns the next number k with k greater or equal i, and k mod n == 0.

i : int

The number to round up.

n : int

The rounding step.

Returns: int

Rounding.RoundUp(i, n)

Full Usage: Rounding.RoundUp(i, n)

Parameters:
    i : int64 - The number to round up.
    n : int64 - The rounding step.

Returns: int64

This returns the next number k with k greater or equal i, and k mod n == 0.

i : int64

The number to round up.

n : int64

The rounding step.

Returns: int64