feat: added DotRecast.Core.Collections namespace

This commit is contained in:
ikpil 2023-10-17 00:24:09 +09:00
parent cfcdf86f2d
commit 587cebd32c
27 changed files with 29 additions and 19 deletions

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public static class CollectionExtensions public static class CollectionExtensions
{ {
@ -20,12 +20,12 @@ namespace DotRecast.Core
// Shift over values // Shift over values
data[insertionIndex + 1] = data[insertionIndex]; data[insertionIndex + 1] = data[insertionIndex];
} }
// Insert the value in sorted order. // Insert the value in sorted order.
data[insertionIndex + 1] = value; data[insertionIndex + 1] = value;
} }
} }
public static void ForEach<T>(this IEnumerable<T> collection, Action<T> action) public static void ForEach<T>(this IEnumerable<T> collection, Action<T> action)
{ {
foreach (var item in collection) foreach (var item in collection)

View File

@ -2,7 +2,7 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public readonly partial struct RcImmutableArray<T> public readonly partial struct RcImmutableArray<T>
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public readonly partial struct RcImmutableArray<T> : IList<T> public readonly partial struct RcImmutableArray<T> : IList<T>
{ {

View File

@ -1,4 +1,4 @@
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public readonly partial struct RcImmutableArray<T> public readonly partial struct RcImmutableArray<T>
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public static class RcImmutableArray public static class RcImmutableArray
{ {

View File

@ -21,7 +21,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace DotRecast.Core namespace DotRecast.Core.Collections
{ {
public class RcSortedQueue<T> public class RcSortedQueue<T>
{ {

View File

@ -21,6 +21,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;

View File

@ -22,6 +22,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Detour.Dynamic.Colliders; using DotRecast.Detour.Dynamic.Colliders;
using DotRecast.Detour.Dynamic.Io; using DotRecast.Detour.Dynamic.Io;
using DotRecast.Recast; using DotRecast.Recast;

View File

@ -21,6 +21,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Detour namespace DotRecast.Detour

View File

@ -18,7 +18,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {

View File

@ -1,4 +1,5 @@
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
namespace DotRecast.Detour namespace DotRecast.Detour
{ {

View File

@ -18,7 +18,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Recast.Demo.Draw; namespace DotRecast.Recast.Demo.Draw;

View File

@ -22,6 +22,7 @@ using System;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Detour.Dynamic; using DotRecast.Detour.Dynamic;
using DotRecast.Recast.Toolset; using DotRecast.Recast.Toolset;

View File

@ -1,5 +1,5 @@
using System; using System;
using DotRecast.Core; using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Recast.Demo.Draw; using DotRecast.Recast.Demo.Draw;
using DotRecast.Recast.Toolset.Gizmos; using DotRecast.Recast.Toolset.Gizmos;

View File

@ -19,8 +19,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.IO; using System.IO;
using System.Numerics; using System.Numerics;
using DotRecast.Core; using DotRecast.Core.Collections;
using DotRecast.Core.Numerics;
using DotRecast.Recast.Demo.Draw; using DotRecast.Recast.Demo.Draw;
using DotRecast.Recast.Demo.Messages; using DotRecast.Recast.Demo.Messages;
using ImGuiNET; using ImGuiNET;

View File

@ -19,7 +19,7 @@ freely, subject to the following restrictions:
*/ */
using System.Numerics; using System.Numerics;
using DotRecast.Core; using DotRecast.Core.Collections;
using DotRecast.Recast.Demo.Tools; using DotRecast.Recast.Demo.Tools;
using ImGuiNET; using ImGuiNET;

View File

@ -19,7 +19,7 @@ freely, subject to the following restrictions:
*/ */
using System.Linq; using System.Linq;
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Recast.Toolset.Builder namespace DotRecast.Recast.Toolset.Builder
{ {

View File

@ -16,7 +16,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
using DotRecast.Core; using DotRecast.Core.Collections;
using DotRecast.Detour; using DotRecast.Detour;
using DotRecast.Recast.Toolset.Geom; using DotRecast.Recast.Toolset.Geom;

View File

@ -21,6 +21,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Recast.Geom; using DotRecast.Recast.Geom;

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Detour; using DotRecast.Detour;
using DotRecast.Detour.Crowd; using DotRecast.Detour.Crowd;

View File

@ -1,4 +1,4 @@
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Recast.Toolset.Tools namespace DotRecast.Recast.Toolset.Tools
{ {

View File

@ -1,4 +1,4 @@
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Recast.Toolset.Tools namespace DotRecast.Recast.Toolset.Tools
{ {

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Detour; using DotRecast.Detour;
using DotRecast.Detour.TileCache; using DotRecast.Detour.TileCache;

View File

@ -1,4 +1,4 @@
using DotRecast.Core; using DotRecast.Core.Collections;
namespace DotRecast.Recast.Toolset.Tools namespace DotRecast.Recast.Toolset.Tools
{ {

View File

@ -1,5 +1,6 @@
using System.Linq; using System.Linq;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
using DotRecast.Detour; using DotRecast.Detour;
using DotRecast.Recast.Geom; using DotRecast.Recast.Geom;

View File

@ -21,6 +21,7 @@ freely, subject to the following restrictions:
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Recast.Geom namespace DotRecast.Recast.Geom

View File

@ -20,6 +20,7 @@ freely, subject to the following restrictions:
using System; using System;
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Core.Collections;
using DotRecast.Core.Numerics; using DotRecast.Core.Numerics;
namespace DotRecast.Recast namespace DotRecast.Recast