Getting to grips with tinyxml and got a small suggestion to make regarding the format specifiers in SetDoubleAttribute and SetDoubleValue. Rather than using %f or %lf, both of which limit precision to six decimal places, I humbly suggest using %.16g - This has the advantage of supressing trailing zeros and extending the precision to the full range of a double.
Regards, Paul.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Getting to grips with tinyxml and got a small suggestion to make regarding the format specifiers in SetDoubleAttribute and SetDoubleValue. Rather than using %f or %lf, both of which limit precision to six decimal places, I humbly suggest using %.16g - This has the advantage of supressing trailing zeros and extending the precision to the full range of a double.
Regards, Paul.
Good idea. Has %g been in the c stdlib since the beginning, or is it a recent addition?
thanks,
lee