|
| template<typename ToFreq , typename Rep , typename Precision > |
| constexpr ToFreq | freq::frequency_cast (const frequency< Rep, Precision > &f) |
| | Converts a frequency to a different precision or representation.
|
| |
| template<typename ToFreq , typename Rep , typename Precision > |
| constexpr ToFreq | freq::floor (const frequency< Rep, Precision > &f) |
| | Converts a frequency to the target type, rounding toward negative infinity.
|
| |
| template<typename ToFreq , typename Rep , typename Precision > |
| constexpr ToFreq | freq::ceil (const frequency< Rep, Precision > &f) |
| | Converts a frequency to the target type, rounding toward positive infinity.
|
| |
| template<typename ToFreq , typename Rep , typename Precision > |
| constexpr ToFreq | freq::round (const frequency< Rep, Precision > &f) |
| | Converts a frequency to the target type, rounding to nearest (ties to even).
|
| |
| template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 > |
| constexpr auto | freq::beat (const frequency< Rep1, Precision1 > &f1, const frequency< Rep2, Precision2 > &f2) -> std::common_type_t< frequency< Rep1, Precision1 >, frequency< Rep2, Precision2 > > |
| | Calculates the beat frequency between two frequencies.
|
| |
| template<typename Rep , typename Precision > |
| constexpr frequency< Rep, Precision > | freq::abs (const frequency< Rep, Precision > &f) |
| | Returns the absolute value of a frequency.
|
| |
| template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 > |
| constexpr auto | freq::operator+ (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) -> std::common_type_t< frequency< Rep1, Precision1 >, frequency< Rep2, Precision2 > > |
| | Returns the sum of two frequencies.
|
| |
| template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 > |
| constexpr auto | freq::operator- (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) -> std::common_type_t< frequency< Rep1, Precision1 >, frequency< Rep2, Precision2 > > |
| | Returns the difference of two frequencies.
|
| |
template<typename Rep1 , typename Precision , typename Rep2 >
requires not_frequency<Rep2> && std::convertible_to<const Rep2&, std::common_type_t<Rep1, Rep2>> |
| constexpr auto | freq::operator* (const frequency< Rep1, Precision > &f, const Rep2 &r) -> frequency< std::common_type_t< Rep1, Rep2 >, Precision > |
| | Multiplies a frequency by a scalar.
|
| |
template<typename Rep1 , typename Rep2 , typename Precision >
requires not_frequency<Rep1> && std::convertible_to<const Rep1&, std::common_type_t<Rep1, Rep2>> |
| constexpr auto | freq::operator* (const Rep1 &r, const frequency< Rep2, Precision > &f) -> frequency< std::common_type_t< Rep1, Rep2 >, Precision > |
| | Multiplies a scalar by a frequency.
|
| |
template<typename Rep1 , typename Precision , typename Rep2 >
requires not_frequency<Rep2> && std::convertible_to<const Rep2&, std::common_type_t<Rep1, Rep2>> |
| constexpr auto | freq::operator/ (const frequency< Rep1, Precision > &f, const Rep2 &s) -> frequency< std::common_type_t< Rep1, Rep2 >, Precision > |
| | Divides a frequency by a scalar.
|
| |
| template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 > |
| constexpr auto | freq::operator/ (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) -> std::common_type_t< Rep1, Rep2 > |
| | Divides two frequencies, returning a scalar.
|
| |
template<typename Rep1 , typename Precision , typename Rep2 >
requires not_frequency<Rep2> && std::convertible_to<const Rep2&, std::common_type_t<Rep1, Rep2>> && (!treat_as_inexact_v<Rep1> && !treat_as_inexact_v<Rep2>) |
| constexpr auto | freq::operator% (const frequency< Rep1, Precision > &f, const Rep2 &s) -> frequency< std::common_type_t< Rep1, Rep2 >, Precision > |
| | Returns the remainder of dividing a frequency by a scalar.
|
| |
template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 >
requires (!treat_as_inexact_v<Rep1> && !treat_as_inexact_v<Rep2>) |
| constexpr auto | freq::operator% (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) -> std::common_type_t< frequency< Rep1, Precision1 >, frequency< Rep2, Precision2 > > |
| | Returns the remainder of dividing two frequencies.
|
| |
| template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 > |
| constexpr bool | freq::operator== (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) |
| |
template<typename Rep1 , typename Precision1 , typename Rep2 , typename Precision2 >
requires std::three_way_comparable<std::common_type_t<Rep1, Rep2>> |
| constexpr auto | freq::operator<=> (const frequency< Rep1, Precision1 > &lhs, const frequency< Rep2, Precision2 > &rhs) |
| |
| std::string | freq::to_string (millihertz f) |
| |
| std::string | freq::to_string (hertz f) |
| |
| template<char... Digits> |
| constexpr freq::millihertz | frequency_literals::operator""_mHz () |
| | Literal for millihertz (e.g., 1000_mHz).
|
| |
| template<char... Digits> |
| constexpr freq::hertz | frequency_literals::operator""_Hz () |
| | Literal for hertz (e.g., 1000_Hz).
|
| |
| template<char... Digits> |
| constexpr freq::kilohertz | frequency_literals::operator""_kHz () |
| | Literal for kilohertz (e.g., 80_kHz).
|
| |
| template<char... Digits> |
| constexpr freq::megahertz | frequency_literals::operator""_MHz () |
| | Literal for megahertz (e.g., 80_MHz).
|
| |
| template<char... Digits> |
| constexpr freq::gigahertz | frequency_literals::operator""_GHz () |
| | Literal for gigahertz (e.g., 2_GHz).
|
| |
| template<char... Digits> |
| constexpr freq::terahertz | frequency_literals::operator""_THz () |
| | Literal for terahertz (e.g., 1_THz).
|
| |