diff --git a/TrueCraft.Core/MathHelper.cs b/TrueCraft.Core/MathHelper.cs index b301b67..27a5714 100644 --- a/TrueCraft.Core/MathHelper.cs +++ b/TrueCraft.Core/MathHelper.cs @@ -174,16 +174,6 @@ namespace TrueCraft.Core return ChunkZ * Chunk.Depth + BlockCoord; } - public static int BlockToChunkX(int BlockCoord) - { - return (int)Math.Floor((double)BlockCoord / Chunk.Width); - } - - public static int BlockToChunkZ(int BlockCoord) - { - return (int)Math.Floor((double)BlockCoord / Chunk.Depth); - } - /// /// Returns a value indicating the most extreme value of the /// provided Vector. diff --git a/TrueCraft.Core/World/World.cs b/TrueCraft.Core/World/World.cs index 111a81b..edc58f8 100644 --- a/TrueCraft.Core/World/World.cs +++ b/TrueCraft.Core/World/World.cs @@ -299,8 +299,8 @@ namespace TrueCraft.Core.World if (coordinates.Y < 0 || coordinates.Y >= Chunk.Height) throw new ArgumentOutOfRangeException("coordinates", "Coordinates are out of range"); - var chunkX = MathHelper.BlockToChunkX(coordinates.X); - var chunkZ = MathHelper.BlockToChunkZ(coordinates.Z); + var chunkX = (int)Math.Floor((double)coordinates.X / Chunk.Width); + var chunkZ = (int)Math.Floor((double)coordinates.Z / Chunk.Depth); chunk = GetChunk(new Coordinates2D(chunkX, chunkZ)); return new Coordinates3D(