OGLplus
(0.59.0)
a C++ wrapper for rendering APIs
eagine
units
unit
si
frequency.hpp
Go to the documentation of this file.
1
9
#ifndef EAGINE_UNITS_UNIT_SI_FREQUENCY_HPP
10
#define EAGINE_UNITS_UNIT_SI_FREQUENCY_HPP
11
12
#include "../../dim/frequency.hpp"
13
#include "
common.hpp
"
14
15
namespace
eagine::units {
16
namespace
base {
17
18
struct
count_of_cycles : unit<number_of_cycles, count_of_cycles> {};
19
20
}
// namespace base
21
22
// si::base_unit<angle>
23
template
<>
24
struct
si::base_unit<base::number_of_cycles> : base::count_of_cycles {};
25
26
// hertz
27
using
hertz = unit<frequency, si>;
28
29
template
<>
30
struct
name_of<hertz> {
31
static
constexpr
const
char
mp_str[] =
"hertz"
;
32
};
33
34
template
<>
35
struct
symbol_of<hertz> {
36
static
constexpr
const
char
mp_str[] =
"Hz"
;
37
};
38
39
// derived
40
using
kilohertz = make_scaled_unit_t<scales::kilo, hertz>;
41
using
megahertz = make_scaled_unit_t<scales::mega, hertz>;
42
using
gigahertz = make_scaled_unit_t<scales::giga, hertz>;
43
// TODO
44
45
}
// namespace eagine::units
46
47
#endif // EAGINE_UNITS_UNIT_SI_FREQUENCY_HPP
common.hpp
Copyright © 2015-2021
Matúš Chochlík
.
<
chochlik -at -gmail.com
>
Documentation generated on Tue Apr 13 2021 by
Doxygen
(version 1.8.17).