public static EntityChunkPos Clamp(EntityChunkPos value, EntityChunkPos max, EntityChunkPos min) { return(new EntityChunkPos( Clamp(value.X, max.X, min.X), Clamp(value.Y, max.Y, min.Y), Clamp(value.Z, max.Z, min.Z))); }
public static double Distance(EntityChunkPos pos1, EntityChunkPos pos2) { float x = pos1.X - pos2.X; float y = pos1.Y - pos2.Y; float z = pos1.Z - pos2.Z; return(Math.Sqrt(x * x + y * y + z * z)); }
public static EntityChunkPos Add(EntityChunkPos pos, float x, float y, float z) { return(new EntityChunkPos(pos.X + x, pos.Y + y, pos.Z + z)); }