Rename chunk::dda to raycast

This commit is contained in:
Sijmen 2021-05-30 00:14:44 +02:00
parent 8bf15dc924
commit c3b03c2723
Signed by: vijfhoek
GPG key ID: 82D05C89B28B0DAE
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ impl Chunk {
}
}
pub fn dda(&self, origin: Vector3<f32>, direction: Vector3<f32>) -> Option<Vector3<usize>> {
pub fn raycast(&self, origin: Vector3<f32>, direction: Vector3<f32>) -> Option<Vector3<usize>> {
let direction = direction.normalize();
let scale = Vector3::new(

View file

@ -359,7 +359,7 @@ impl State {
let camera = &self.world_state.camera;
let chunk = &mut self.world_state.chunk;
let coords = chunk.dda(camera.position.to_vec(), camera.direction());
let coords = chunk.raycast(camera.position.to_vec(), camera.direction());
if coords != chunk.highlighted {
chunk.highlighted = coords;
self.world_state.update_chunk(&self.render_queue);