简单重构拆分 SimulationWorld
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace SepCore.Simulation
|
||||
{
|
||||
internal static class SimulationCell
|
||||
{
|
||||
public static long Key(int x, int z)
|
||||
{
|
||||
return ((long)x << 32) ^ (uint)z;
|
||||
}
|
||||
|
||||
public static int ToCell(float value, float cellSize)
|
||||
{
|
||||
return (int)math.floor(value / cellSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user