quanta 0.1.0
Type-safe units for temperature, frequency, electrical and spatial quantities, modeled after std::chrono
Loading...
Searching...
No Matches
Standard Frequency Type Aliases

Standard integer-based frequency types using int64_t representation. More...

Typedefs

using quanta::frequency::millihertz = frequency< int64_t, std::milli >
 Frequency with 0.001 Hz (millihertz) precision.
 
using quanta::frequency::hertz = frequency< int64_t >
 Frequency with 1 Hz precision.
 
using quanta::frequency::kilohertz = frequency< int64_t, std::kilo >
 Frequency with 1000 Hz (kilohertz) precision.
 
using quanta::frequency::megahertz = frequency< int64_t, std::mega >
 Frequency with 1,000,000 Hz (megahertz) precision.
 
using quanta::frequency::gigahertz = frequency< int64_t, std::giga >
 Frequency with 1,000,000,000 Hz (gigahertz) precision.
 
using quanta::frequency::terahertz = frequency< int64_t, std::tera >
 Frequency with 1,000,000,000,000 Hz (terahertz) precision.
 

Detailed Description

Standard integer-based frequency types using int64_t representation.

For floating-point representations, use frequency<double, Precision>.

// Integer types (default)
hertz audio{44100};
kilohertz cpu{3200};
megahertz fm{88};
gigahertz wifi{2};
terahertz optical{193}; // Near-infrared light
// Floating-point types (custom)
using hertz_d = frequency<double>;
using kilohertz_d = frequency<double, std::kilo>;
using megahertz_d = frequency<double, std::mega>;
hertz_d concert_a{440.0};
megahertz_d fm_precise{88.5};
frequency< int64_t > hertz
Frequency with 1 Hz precision.
frequency< int64_t, std::kilo > kilohertz
Frequency with 1000 Hz (kilohertz) precision.
frequency< int64_t, std::mega > megahertz
Frequency with 1,000,000 Hz (megahertz) precision.
frequency< int64_t, std::giga > gigahertz
Frequency with 1,000,000,000 Hz (gigahertz) precision.
frequency< int64_t, std::tera > terahertz
Frequency with 1,000,000,000,000 Hz (terahertz) precision.

Typedef Documentation

◆ gigahertz

using quanta::frequency::gigahertz = typedef frequency<int64_t, std::giga>

Frequency with 1,000,000,000 Hz (gigahertz) precision.

Definition at line 991 of file frequency.hpp.

◆ hertz

using quanta::frequency::hertz = typedef frequency<int64_t>

Frequency with 1 Hz precision.

Definition at line 985 of file frequency.hpp.

◆ kilohertz

using quanta::frequency::kilohertz = typedef frequency<int64_t, std::kilo>

Frequency with 1000 Hz (kilohertz) precision.

Definition at line 987 of file frequency.hpp.

◆ megahertz

using quanta::frequency::megahertz = typedef frequency<int64_t, std::mega>

Frequency with 1,000,000 Hz (megahertz) precision.

Definition at line 989 of file frequency.hpp.

◆ millihertz

using quanta::frequency::millihertz = typedef frequency<int64_t, std::milli>

Frequency with 0.001 Hz (millihertz) precision.

Definition at line 983 of file frequency.hpp.

◆ terahertz

using quanta::frequency::terahertz = typedef frequency<int64_t, std::tera>

Frequency with 1,000,000,000,000 Hz (terahertz) precision.

Definition at line 993 of file frequency.hpp.