mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
Soundplayer: Use exp() instead of pow(E, n)
This commit is contained in:
parent
3e135f347f
commit
f6ddaef8bf
Notes:
sideshowbarker
2024-07-17 19:42:21 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/f6ddaef8bf4 Pull-request: https://github.com/SerenityOS/serenity/pull/12163 Reviewed-by: https://github.com/BertalanD ✅
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ void BarsVisualizationWidget::paint_event(GUI::PaintEvent& event)
|
|||
groups[i / bins_per_group] += AK::fabs(m_sample_buffer.data()[i].real());
|
||||
}
|
||||
for (int i = 0; i < group_count; i++)
|
||||
groups[i] /= max * freq_bin / (m_adjust_frequencies ? (clamp(AK::pow(AK::E<double>, (double)i / group_count * 3.) - 1.75, 1., 15.)) : 1.);
|
||||
groups[i] /= max * freq_bin / (m_adjust_frequencies ? (clamp(AK::exp((double)i / group_count * 3.) - 1.75, 1., 15.)) : 1.);
|
||||
|
||||
const int horizontal_margin = 30;
|
||||
const int top_vertical_margin = 15;
|
||||
|
|
Loading…
Add table
Reference in a new issue