Function veloren_common::terrain::vec2_as_uniform_idx

source ยท
pub fn vec2_as_uniform_idx(map_size_lg: MapSizeLg, idx: Vec2<i32>) -> usize
Expand description

Computes the index of a Vec2 of a SimChunk from a position, where the index is generated by uniform_noise. NOTE: Both components of idx should be in-bounds!