Ejemplo n.º 1
0
 static string GetPositionInsideCell_GetDebugString(float2 p, int width, int height, float2 worldSize)
 {
     NativeGrid.GetPositionInsideCell(p.x, width, worldSize.x, out int xlo, out int xhi, out float xf);
     NativeGrid.GetPositionInsideCell(p.y, height, worldSize.y, out int ylo, out int yhi, out float yf);
     return($"\n	x: {xlo}... {xf:R} ...{xhi}\n	y: {ylo}... {yf:R} ...{yhi}");
 }
 public static void GetPositionInsideCell(FLOAT2 point, INT2 numCells, FLOAT2 worldSize, out int2 lowerCell, out int2 upperCell, out float2 normalizedPositionBetweenThoseTwoPoints) => NativeGrid.GetPositionInsideCell(point, numCells, worldSize, out lowerCell, out upperCell, out normalizedPositionBetweenThoseTwoPoints);