Sound Byte Libs
0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1
// sbl/dsp/math/constants.hpp — The numbers every layer reaches for
2
//
3
// One definition of pi for the whole audio stack, so no header carries its
4
// own literal (style guide: no magic numbers; RPT-032 D3 / backlog #48).
5
6
#ifndef SBL_DSP_MATH_CONSTANTS_HPP_
7
#define SBL_DSP_MATH_CONSTANTS_HPP_
8
9
namespace
sbl::dsp::math
{
10
11
inline
constexpr
float
PI
= 3.14159265358979323846f;
12
inline
constexpr
float
TWO_PI
= 2.0f *
PI
;
13
inline
constexpr
float
HALF_PI
= 0.5f *
PI
;
14
15
/// The phase accumulator's full range: uint32_t [0, 2^32) is one cycle.
16
inline
constexpr
float
PHASE_ACCUMULATOR_RANGE
= 4294967296.0f;
17
18
}
// namespace sbl::dsp::math
19
20
#endif
// SBL_DSP_MATH_CONSTANTS_HPP_
sbl::dsp::math
Cross-cutting math used at every audio layer.
Definition
clamp.hpp:10
sbl::dsp::math::PI
constexpr float PI
Definition
constants.hpp:11
sbl::dsp::math::PHASE_ACCUMULATOR_RANGE
constexpr float PHASE_ACCUMULATOR_RANGE
The phase accumulator's full range: uint32_t [0, 2^32) is one cycle.
Definition
constants.hpp:16
sbl::dsp::math::TWO_PI
constexpr float TWO_PI
Definition
constants.hpp:12
sbl::dsp::math::HALF_PI
constexpr float HALF_PI
Definition
constants.hpp:13
src
sbl
dsp
math
constants.hpp
Generated by
1.9.8