add ofidx

This commit is contained in:
ikpil 2023-06-15 18:27:19 +09:00
parent 4c97468f06
commit 9d080e3b83
1 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
using System.Collections.Immutable;
using System.Linq;
namespace DotRecast.Recast
{
@ -21,6 +22,11 @@ namespace DotRecast.Recast
Name = name;
}
public static PartitionType OfIdx(int idx)
{
return Values.FirstOrDefault(x => x.Idx == idx) ?? WATERSHED;
}
public override string ToString() => Name;
}
}