def _calculate_rydeberg_spectra(_n1: int, _n2: int, _R: float) -> float:
    """Calculates the spectra from the Rydeberg formula.

    Decorators:
        nb.njit

    Arguments:
        _n1 {int} -- First principal quantum number.
        _n2 {int} -- Second principal quantum number.
        _R {float} -- Rydeberg constant.

    Returns:
        float -- Calculated wavelength.
    """
    return _R * (1.0 / _n1 ** 2 - 1.0 / _n2 ** 2)