def get_sample_per_cycle(rate, freq):
    """
    calculate the samples per cycle
    :param rate: sample rate value
    :param freq: sample rate value
    :return: samples per cycle
    """
    if freq == 0:
        return 0
    return rate / freq