All UDLs are now prefixed with q_

This commit is contained in:
Mateusz Pusz
2020-02-17 15:56:06 +01:00
parent 0566cc631d
commit 18620044c5
65 changed files with 768 additions and 768 deletions
+8 -8
View File
@@ -56,22 +56,22 @@ int main()
std::cout.setf(std::ios_base::fixed, std::ios_base::floatfield);
std::cout.precision(3);
constexpr auto C = 0.47uF;
constexpr auto V0 = 5.0V;
constexpr auto R = 4.7kR;
constexpr auto C = 0.47q_uF;
constexpr auto V0 = 5.0q_V;
constexpr auto R = 4.7q_kR;
for (auto t = 0ms; t <= 50ms; ++t) {
for (auto t = 0q_ms; t <= 50q_ms; ++t) {
const auto Vt = V0 * std::exp(-t / (R * C));
std::cout << "at " << t << " voltage is ";
if (Vt >= 1V)
if (Vt >= 1q_V)
std::cout << Vt;
else if (Vt >= 1mV)
else if (Vt >= 1q_mV)
std::cout << voltage::mV<>{Vt};
else if (Vt >= 1uV)
else if (Vt >= 1q_uV)
std::cout << voltage::uV<>{Vt};
else if (Vt >= 1nV)
else if (Vt >= 1q_nV)
std::cout << voltage::nV<>{Vt};
else
std::cout << voltage::pV<>{Vt};