From 7892ef9d248c189be68ce7faf63230ec0a318b67 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Feb 2022 10:11:32 +0100 Subject: refactor: reorganize & add debugging --- src/utils/general.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/utils/general.cpp (limited to 'src/utils/general.cpp') diff --git a/src/utils/general.cpp b/src/utils/general.cpp new file mode 100644 index 0000000..bbcd4dd --- /dev/null +++ b/src/utils/general.cpp @@ -0,0 +1,14 @@ +#include "general.hpp" + +void stop() +{ + while (true) {} +} + +unique_ptr floatToStr(float num, unsigned int width, unsigned int precision) +{ + auto str = make_unique(width + precision); + dtostrf(num, width, precision, str->c_str); + + return str; +} -- cgit v1.2.3-18-g5258