X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fstrings%2Fprint_float.cpp;fp=src%2Fstlplus%2Fstrings%2Fprint_float.cpp;h=a36c2c110875cd8b0a9489c87ef98354387d490a;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/strings/print_float.cpp b/src/stlplus/strings/print_float.cpp new file mode 100644 index 0000000..a36c2c1 --- /dev/null +++ b/src/stlplus/strings/print_float.cpp @@ -0,0 +1,32 @@ +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +//////////////////////////////////////////////////////////////////////////////// +#include "print_float.hpp" +#include "string_float.hpp" + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // floating-point types + + void print_float(std::ostream& device, float f, real_display_t display, unsigned width, unsigned precision) + throw(std::invalid_argument) + { + device << float_to_string(f, display, width, precision); + } + + void print_double(std::ostream& device, double f, real_display_t display, unsigned width, unsigned precision) + throw(std::invalid_argument) + { + device << double_to_string(f, display, width, precision); + } + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus