def get_reaching_multiple(step_length, target_length):
    """Return first multiple to reach or surpass distance.

    Parameters
    ==========
    step_length (integer)
        the length of steps towards the target.
    target_length (integer)
        the total length to cover till target.

    This functions is very useful for simple scrolling
    features and was first implemented on the load game
    menu (in the main menu), on the game package.

    >>> get_reaching_multiple(2, 11)
    12
    >>> get_reaching_multiple(10, 101)
    110
    >>> get_reaching_multiple(10, 100)
    100
    >>> get_reaching_multiple(10, 10)
    10
    >>> get_reaching_multiple(10, 9)
    10
    """
    if step_length >= target_length:
        return step_length

    else:

        steps_no, rest = divmod(target_length, step_length)

        return step_length * (steps_no + 1) if rest else step_length * steps_no
Return first multiple to reach or surpass distance.

    Parameters
    ==========
    step_length (integer)
        the length of steps towards the target.
    target_length (integer)
        the total length to cover till target.

    This functions is very useful for simple scrolling
    features and was first implemented on the load game
    menu (in the main menu), on the game package.

    >>> get_reaching_multiple(2, 11)
    12
    >>> get_reaching_multiple(10, 101)
    110
    >>> get_reaching_multiple(10, 100)
    100
    >>> get_reaching_multiple(10, 10)
    10
    >>> get_reaching_multiple(10, 9)
    10
    
nodezator/ourstdlibs/mathutils.py