1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Custom float-printing function.

This commit is contained in:
Bartosz Taudul
2020-01-31 01:19:08 +01:00
parent 8d5f4d7363
commit 36fb1f96e2
2 changed files with 13 additions and 6 deletions
+8
View File
@@ -1,9 +1,17 @@
#ifndef __TRACYPRINT_HPP__
#define __TRACYPRINT_HPP__
#include <stdio.h>
namespace tracy
{
template<typename T>
static inline char* PrintFloat( char* begin, char* end, T value, int precision )
{
return begin + sprintf( begin, "%.*f", precision, value );
}
const char* TimeToString( int64_t ns );
const char* RealToString( double val, bool separator );
const char* MemSizeToString( int64_t val );