numerical scale which is decibel
More...
#include <core.h>
|
| template<class T> |
| static T | linearize (const T value) noexcept |
| | linearizes value
|
| template<class T> |
| static T | scale (const T value) noexcept |
| | returns value in dB
|
numerical scale which is decibel
Represents a decibel numerical scale. Scales a value to dB.
- See also
- unit
◆ linearize()
template<class T>
| T units::decibel_scale::linearize |
( |
const T | value | ) |
|
|
inlinestaticnoexcept |
linearizes value
- Template Parameters
-
- Parameters
-
| [in] | value | value to linearize |
- Returns
- std::pow(10, value / 10)
◆ scale()
template<class T>
| T units::decibel_scale::scale |
( |
const T | value | ) |
|
|
inlinestaticnoexcept |
returns value in dB
- Template Parameters
-
- Parameters
-
- Returns
- 10 * std::log10(value)
The documentation for this struct was generated from the following file:
- /home/runner/work/units/units/include/units/core.h