Skip to content

Commit 43c9662

Browse files
committed
fix: clippy
1 parent b8303d3 commit 43c9662

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/noise.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub(crate) fn generate_noise_vector(
314314
for j in 0..size[1] {
315315
let x = f64::from(i as i32 - (size[0] / 2) as i32) / scale + offset[0];
316316
let y = f64::from(j as i32 - (size[1] / 2) as i32) / scale + offset[1];
317-
let value = (noise.get([x, y]) + 1.0) / 2.0 * 100.0;
317+
let value = f64::midpoint(noise.get([x, y]), 1.0) * 100.0;
318318
row.push(value);
319319
}
320320
noise_vector.push(row);

src/util/gltf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn bounding_coords(points: &[Vertex]) -> ([f32; 3], [f32; 3]) {
4747
(min, max)
4848
}
4949

50-
fn align_to_multiple_of_four(n: &mut usize) {
50+
const fn align_to_multiple_of_four(n: &mut usize) {
5151
*n = (*n + 3) & !3;
5252
}
5353

0 commit comments

Comments
 (0)