src/core/common/random.hpp
inline uint32_t AddJitter(uint32_t aValue, uint16_t aJitter)
{
    aJitter = (aJitter <= aValue) ? aJitter : static_cast<uint16_t>(aValue);

    return aValue + GetUint32InRange(0, 2 * aJitter + 1) - aJitter;
}
/**
 * This function adds a random jitter within a given range to a given value.
 *
 * @param[in]  aValue     A value to which the random jitter is added.
 * @param[in]  aJitter    Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`.
 *
 * @returns    The given value with an added random jitter.
 *
 */
This function adds a random jitter within a given range to a given value.
@param[in]  aValue     A value to which the random jitter is added.
@param[in]  aJitter    Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`.

@returns    The given value with an added random jitter.
This function adds a random jitter within a given range to a given value . @param [ in ] aValue A value to which the random jitter is added . @param [ in ] aJitter Maximum jitter . Random jitter is selected from the range ` [ - aJitter aJitter ] ` . @returns The given value with an added random jitter .
inline uint32_t AddJitter(uint32_t aValue, uint16_t aJitter)
{
    aJitter = (aJitter <= aValue) ? aJitter : static_cast<uint16_t>(aValue);
    return aValue + GetUint32InRange(0, 2 * aJitter + 1) - aJitter;
}
inline uint32_t AddJitter ( uint32_t aValue , uint16_t aJitter ) { aJitter = ( aJitter <= aValue ) ? aJitter : static_cast < uint16_t > ( aValue ) ; return aValue + GetUint32InRange ( 0 , 2 * aJitter + 1 ) - aJitter ; }
This function adds a random jitter within a given range to a given value.
This function adds a random jitter within a given range to a given value .