LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
QFrequency.hpp
Go to the documentation of this file.
1/*
2 * This code is a modified version of Benjamin Jurke's work in 2015. You can read his blog post
3 * here:
4 * https://benjaminjurke.com/content/articles/2015/compile-time-numerical-unit-dimension-checking/
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
10#pragma once
11
13
14namespace okapi {
15QUANTITY_TYPE(0, 0, -1, 0, QFrequency)
16
17constexpr QFrequency Hz(1.0);
18
19inline namespace literals {
20constexpr QFrequency operator"" _Hz(long double x) {
21 return QFrequency(x);
22}
23constexpr QFrequency operator"" _Hz(unsigned long long int x) {
24 return QFrequency(static_cast<long double>(x));
25}
26} // namespace literals
27} // namespace okapi
#define QUANTITY_TYPE(_Mdim, _Ldim, _Tdim, _Adim, name)
Definition RQuantity.hpp:84
constexpr QFrequency Hz(1.0)
@ x
Roll Axis.