Skip to content

AudioResampler: use std::numbers::pi instead of hand-rolled pi literal - #1557

Merged
Gin890 merged 1 commit into
mainfrom
audio-resampler-std-numbers-pi
Oct 11, 2026
Merged

Gin890 merged 1 commit into
mainfrom
audio-resampler-std-numbers-pi

Conversation

@Gin890

@Gin890 Gin890 commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Replaces the hand-rolled literal 3.1415926535897932385 in Kernels_AudioResampler_WeightTable.cpp with std::numbers::pi (project is C++23).

No numerical change: the literal and std::numbers::pi round to the exact same double (0x1.921fb544442d18p+1), so the generated weight tables are bit-identical. This is purely a readability improvement.

Verified with a g++ -std=c++23 -fsyntax-only compile of the translation unit.

The hand-rolled literal 3.1415926535897932385 rounds to the exact same
double as std::numbers::pi (0x1.921fb544442d18p+1), so this is a
no-op numerically and just makes the code more readable.
@Gin890
Gin890 merged commit b28ae3e into main Oct 11, 2026
14 checks passed
@Gin890
Gin890 deleted the audio-resampler-std-numbers-pi branch October 11, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants