Skip to content

Commit

Permalink
fix(score): incorrect proportion calcuation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiving committed Feb 2, 2024
1 parent 4e593a7 commit 511b23a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ impl Score {
// Hues with more usage in neighboring 30 degree slice get a larger number.
let mut hue_excited_proportions = [0.0; 360];

for hue in hue_population.into_iter().take(360) {
let proportion = hue as f64 / population_sum;
for (hue, population) in hue_population.into_iter().enumerate().take(360) {
let proportion = (population as f64) / population_sum;

for i in ((hue as i32) - 14)..((hue as i32) + 16) {
let neighbor_hue = sanitize_degrees_int(i);
Expand Down

0 comments on commit 511b23a

Please sign in to comment.