Skip to content

Commit

Permalink
Make clippy stop complaining about noteblock pitch LUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul1365972 authored and StackDoubleFlow committed Jan 15, 2025
1 parent 2545b25 commit 10d5953
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/redstone/src/noteblock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use mchprs_world::World;

// LUT generated via f32::powf(2.0, (note as f32 - 12.0) / 12.0)
// This is hardcoded because at this point floating point operations are not allowed in const contexts
#[allow(clippy::approx_constant)]
const PITCHES_TABLE: [f32; 25] = [
0.5, 0.5297315, 0.561231, 0.59460354, 0.62996054, 0.6674199, 0.70710677, 0.74915355, 0.7937005,
0.8408964, 0.8908987, 0.9438743, 1.0, 1.0594631, 1.122462, 1.1892071, 1.2599211, 1.3348398,
Expand Down

0 comments on commit 10d5953

Please sign in to comment.