unreal.RoundingMode

class unreal.RoundingMode

Bases: unreal.EnumBase

Provides rounding modes for converting numbers into localized text

C++ Source:

  • Module: Engine

  • File: KismetTextLibrary.h

FROM_ZERO

0.1 becomes 1, -0.1 becomes -1

Type

3

Type

Rounds to the value which is further from zero, “larger” in absolute value

HALF_FROM_ZERO

-0.5 becomes -1.0, 0.5 becomes 1.0

Type

1

Type

Rounds to nearest place, equidistant ties go to the value which is further from zero

HALF_TO_EVEN

1.5 becomes 2, 0.5 becomes 0

Type

0

Type

Rounds to the nearest place, equidistant ties go to the value which is closest to an even value

HALF_TO_ZERO

-0.5 becomes 0, 0.5 becomes 0.

Type

2

Type

Rounds to nearest place, equidistant ties go to the value which is closer to zero

TO_NEGATIVE_INFINITY

0.1 becomes 0, -0.1 becomes -1

Type

5

Type

Rounds to the value which is more negative

TO_POSITIVE_INFINITY

0.1 becomes 1, -0.1 becomes 0

Type

6

Type

Rounds to the value which is more positive

TO_ZERO

0.1 becomes 0, -0.1 becomes 0

Type

4

Type

Rounds to the value which is closer to zero, “smaller” in absolute value