summaryrefslogtreecommitdiff
path: root/src/utils/general.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/general.hpp')
-rw-r--r--src/utils/general.hpp33
1 files changed, 23 insertions, 10 deletions
diff --git a/src/utils/general.hpp b/src/utils/general.hpp
index 9ad0655..dbdbdfc 100644
--- a/src/utils/general.hpp
+++ b/src/utils/general.hpp
@@ -9,15 +9,28 @@
void stop();
/**
- * Converts a floating point number to a string.
+ * Converts a double number to a string.
*
- * @param num A floating point number
- * @param width The desired float width
- * @param precision The desired float precision
- * @returns The float as a string.
+ * @param num A double number
+ * @param width The desired double width
+ * @param precision The desired double precision
+ * @returns The double as a string.
*/
-unique_ptr<SmartString> floatToStr(
- float num,
- unsigned int width = 3,
- unsigned int precision = 2
-);
+UniquePtr<SmartString> doubleToStr(double num, unsigned int width = 3,
+ unsigned int precision = 2);
+
+/**
+ * Converts a integer to a string.
+ *
+ * @param num A number
+ * @returns The number as a string.
+ */
+UniquePtr<SmartString> intToStr(int num);
+
+/**
+ * Converts a unsigned integer to a string.
+ *
+ * @param num A number
+ * @returns The number as a string.
+ */
+UniquePtr<SmartString> uintToStr(unsigned int num);