lib/head_music/style/analysis.rb in head_music-0.20.0 vs lib/head_music/style/analysis.rb in head_music-0.22.0
- old
+ new
@@ -21,9 +21,10 @@
@annotations ||= @guide.analyze(voice)
end
def fitness
return 1.0 if annotations.empty?
+
@fitness ||= fitness_scores.inject(:+).to_f / fitness_scores.length
end
def adherent?
fitness == 1