Files
p-rad/src/core/units.hpp
T
2026-08-07 15:37:13 +02:00

16 lines
328 B
C++

#pragma once
#include "config.hpp"
template<typename T>
static inline T feet_to_meters(T ft) {
return static_cast<T>(ft * 0.3048);
}
template<typename T>
static inline T knot_to_km(T kt) {
return static_cast<T>(kt * 1.852);
}
#ifdef CONFIG_METRIC
#define SPEED_UNIT "kmph"
#else
#define SPEED_UNIT "knot"
#endif