Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
units::decibel_scale Struct Reference

numerical scale which is decibel More...

#include <core.h>

Static Public Member Functions

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

Detailed Description

numerical scale which is decibel

Represents a decibel numerical scale. Scales a value to dB.

See also
unit

Member Function Documentation

◆ linearize()

template<class T>
T units::decibel_scale::linearize ( const T value)
inlinestaticnoexcept

linearizes value

Template Parameters
Tunderlying type of unit
Parameters
[in]valuevalue 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
Tunderlying type of unit
Parameters
[in]valuevalue to scale
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