ID EN
Decimal

next_toward

Python 3.11

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.

Syntax

PYTHON
next_toward(other, context=None)