def number_round_operation(value: NumberVar, ndigits: NumberVar | int):
    """Round the number.

    Args:
        value: The number.
        ndigits: The number of digits.

    Returns:
        The number round operation.
    """
    if (isinstance(ndigits, LiteralNumberVar) and ndigits._var_value == 0) or (
        isinstance(ndigits, int) and ndigits == 0
    ):
        return var_operation_return(js_expression=f"Math.round({value})", var_type=int)
    return var_operation_return(
        js_expression=f"(+{value}.toFixed({ndigits}))", var_type=float
    )
Round the number.

    Args:
        value: The number.
        ndigits: The number of digits.

    Returns:
        The number round operation.
    
reflex/vars/number.py