This commit is contained in:
Alex Huddleston 2017-11-17 17:41:05 -06:00
parent 41eb4a721f
commit c308870fd2

View file

@ -60,12 +60,7 @@ fn return_at(x: f64, y: f64, fbmnoise: &Fbm<f64>) -> f64 {
fn find_l_w(obj: &Obj<SimplePolygon>) -> (f32, f32) { fn find_l_w(obj: &Obj<SimplePolygon>) -> (f32, f32) {
if let Some(first) = obj.position.first() { if let Some(first) = obj.position.first() {
let initial = ( let initial = (first[0], first[1], first[0], first[1]);
first[0],
first[1],
first[0],
first[1]
);
let min_maxes = obj.position.iter().fold(initial, |acc, point| { let min_maxes = obj.position.iter().fold(initial, |acc, point| {
let acc = if acc.0 > point[0] { let acc = if acc.0 > point[0] {
@ -91,7 +86,13 @@ fn find_l_w(obj: &Obj<SimplePolygon>) -> (f32, f32) {
} }
} }
fn generate_city(positions: Vec<[f32; 3]>, layers: i32, spacing: f32, length: f32, width: f32) -> Vec<[f32; 3]> { fn generate_city(
positions: Vec<[f32; 3]>,
layers: i32,
spacing: f32,
length: f32,
width: f32,
) -> Vec<[f32; 3]> {
positions positions
} }