/Engine/Source/Runtime/Core/Public/Containers/Deque.h
This implementation assumes that theIndexvalue is never going to exceed twice the Range value. This way we can avoid the modulo operator or a power of 2 range value requirement and have an efficient wrap around function.
namespace UE { namespace Deque { namespace Private { template<typename InSizeType> InSizeType UE::Deque::Private::WrapAround ( InSizeType Index, InSizeType Range ) } } }