2
Copyright (c) 2009 NetAllied Systems GmbH
4
This file is part of Common libftoa.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#ifndef __COMMON_DTOA_H__
12
#define __COMMON_DTOA_H__
19
/** The minimum size of the buffer, passed to dtoa.*/
20
static const size_t DTOA_BUFFERSIZE = 30;
23
/** Returns the number of bytes written in to the buffer.
24
@param buffer The buffer the string representation of the number will be written to. Its size must be at
25
least DTOA_BUFFERSIZE.
26
@param doublePrecision If set to true, up to 16 significant digits are written, otherwise 6*/
27
int dtoa(double f, char* buffer, bool doublePrecision = false);
31
#endif // __COMMON_DTOA_H__