BolterLibrary.Navigation.RebuildList C# (CSharp) Method

RebuildList() private method

private RebuildList ( IEnumerable pList, bool forward, Pathing pType, int index ) : IEnumerable
pList IEnumerable
forward bool
pType Pathing
index int
return IEnumerable
        private IEnumerable<D3DXVECTOR2> RebuildList(IEnumerable<D3DXVECTOR2> pList, bool forward, Pathing pType, int index = 0)
        {
            var rPlist = new List<D3DXVECTOR2>(pList);

            if (!forward)
                rPlist.Reverse();

            int localIndex;

            if (pType == Pathing.Normal)
                localIndex = 0;
            else
                localIndex = pType == Pathing.At_Index ? index : GetClosestIndex(rPlist, AllEntities.Get2DPos());

            return rPlist.Skip(localIndex);
        }