round_to_int
- PlasmaCalcs.tools.math.round_to_int(x, mode='round')
return x rounded to an integer, using the specified mode.
(if x is already an integer, returns x unchanged.)- mode: ‘round’, ‘floor’, ‘ceil’ or ‘int’
- ‘round’ –> as per builtins.round(). round to nearest integer, ties toward even integers.‘int’ –> as per builtins.int(). always rounds towards 0.‘floor’ –> round towards negative infinity.‘ceil’ –> round towards positive infinity.