PyDocs

Nav

Numeric and Mathematical Modules

Decimal.next_toward

decimal

method of Decimal
  • Decimal.next_toward(other, context=None)
Returns the number closest to self, in the direction towards other.

If the two operands are unequal, return the number closest to the
first operand in the direction of the second operand.  If both
operands are numerically equal, return a copy of the first operand
with the sign set to be the same as the sign of the second operand.
0 Examples
No examples for decimal/Decimal.next_toward.
See Also
No see-alsos for decimal/Decimal.next_toward
0 Notes
No notes for Decimal.next_toward