summaryrefslogtreecommitdiff
path: root/src/utils/general.hpp
blob: 9ad06556ab1152d98e456d9b8286952c9977982b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "memory.hpp"
#include "smart_string.hpp"

/**
 * Stops code execution.
 */
void stop();

/**
 * Converts a floating point 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.
 */
unique_ptr<SmartString> floatToStr(
	float num,
	unsigned int width = 3,
	unsigned int precision = 2
);