sgr_commhandler.utils.value_util
Provides data value manipulation functions.
Attributes
Classes
Defines the kind of rounding method. |
Functions
|
Rounds a floating-point value to an integer, using a given rounding method. |
Module Contents
- sgr_commhandler.utils.value_util.logger
- class sgr_commhandler.utils.value_util.RoundingScheme
Bases:
enum.EnumDefines the kind of rounding method.
- floor = 'floor'
- ceil = 'ceil'
- near = 'Near'
- sgr_commhandler.utils.value_util.round_to_int(value, scheme=RoundingScheme.floor)
Rounds a floating-point value to an integer, using a given rounding method.
- Parameters:
value (float) – the floating-point value to round
scheme (RoundingScheme) – the method of rounding, defaults to floor
- Return type:
int