Skip to content

Commit

Permalink
Fix example compilation on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
hakolao committed Sep 27, 2024
1 parent a1175d6 commit 263421d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions examples/sand/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(more_float_constants)]

mod grid;
mod sand;
mod timer;
Expand Down
6 changes: 3 additions & 3 deletions examples/sand/sand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ pub fn variate_color(color: [u8; 3], range: f32, seed: Vec2) -> [u8; 3] {
[r, g, b]
}

const PHI: f32 = 1.61803;

fn sticky_rand(pos: Vec2) -> f32 {
let seed = 123.0;
((pos * std::f32::consts::PHI).distance(pos) * seed * pos.x)
.tan()
.fract()
((pos * PHI).distance(pos) * seed * pos.x).tan().fract()
}

0 comments on commit 263421d

Please sign in to comment.