Ok
This commit is contained in:
parent
41eb4a721f
commit
c308870fd2
1 changed files with 11 additions and 10 deletions
15
src/main.rs
15
src/main.rs
|
@ -60,12 +60,7 @@ fn return_at(x: f64, y: f64, fbmnoise: &Fbm<f64>) -> f64 {
|
|||
|
||||
fn find_l_w(obj: &Obj<SimplePolygon>) -> (f32, f32) {
|
||||
if let Some(first) = obj.position.first() {
|
||||
let initial = (
|
||||
first[0],
|
||||
first[1],
|
||||
first[0],
|
||||
first[1]
|
||||
);
|
||||
let initial = (first[0], first[1], first[0], first[1]);
|
||||
|
||||
let min_maxes = obj.position.iter().fold(initial, |acc, point| {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue