Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Jan 2, 2021
1 parent 4530fb6 commit b8182fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/generate/heightmap.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::{coordinates, terrain::raster::Raster};
use crate::coordinates;
use crate::mapfile::MapFile;
use crate::terrain::quadtree::node::VNode;
use crate::terrain::raster::{GlobalRaster, RasterCache};
use crate::terrain::tile_cache::{LayerParams, LayerType};
use anyhow::Error;
use cgmath::Vector2;
use crossbeam::channel::{self, Receiver, Sender};
use futures::{Future, TryFutureExt, future::{self, BoxFuture, FutureExt}, stream::FuturesUnordered};
use futures::{Future, future::{self, BoxFuture, FutureExt}};
use lru_cache::LruCache;
use rayon::prelude::*;
use std::collections::{HashMap, HashSet};
use std::collections::{HashMap};
use std::collections::VecDeque;
use std::io::{Cursor, Read, Write};
use std::sync::{Arc, Weak};
Expand Down
12 changes: 6 additions & 6 deletions src/terrain/quadtree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ impl VNode {

fn cspace_to_fspace(cspace: Vector3<f64>) -> (u8, f64, f64) {
let (face, x, y) = match (cspace.x, cspace.y, cspace.z) {
(1.0, a, b) => (0, a, -b),
(-1.0, a, b) => (1, -a, -b),
(a, 1.0, b) => (2, a, b),
(a, -1.0, b) => (3, -a, b),
(a, b, 1.0) => (4, a, -b),
(a, b, -1.0) => (5, -a, -b),
(unit, a, b) if unit == 1.0 => (0, a, -b),
(unit, a, b) if unit == -1.0 => (1, -a, -b),
(a, unit, b) if unit == 1.0 => (2, a, b),
(a, unit, b) if unit == -1.0 => (3, -a, b),
(a, b, unit) if unit == 1.0 => (4, a, -b),
(a, b, unit) if unit == -1.0 => (5, -a, -b),
_ => panic!("Coordinate is not on unit cube surface"),
};

Expand Down

0 comments on commit b8182fa

Please sign in to comment.