diff options
Diffstat (limited to 'src/formatter.cpp')
-rw-r--r-- | src/formatter.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/formatter.cpp b/src/formatter.cpp index dcaa3a5..17fb311 100644 --- a/src/formatter.cpp +++ b/src/formatter.cpp | |||
@@ -10,6 +10,51 @@ | |||
10 | #include "bu/stream.h" | 10 | #include "bu/stream.h" |
11 | #include <string.h> | 11 | #include <string.h> |
12 | 12 | ||
13 | template<> float Bu::tlog( float x ) | ||
14 | { | ||
15 | return logf( x ); | ||
16 | } | ||
17 | |||
18 | template<> double Bu::tlog( double x ) | ||
19 | { | ||
20 | return log( x ); | ||
21 | } | ||
22 | |||
23 | template<> long double Bu::tlog( long double x ) | ||
24 | { | ||
25 | return logl( x ); | ||
26 | } | ||
27 | |||
28 | template<> float Bu::tfloor( float x ) | ||
29 | { | ||
30 | return floorf( x ); | ||
31 | } | ||
32 | |||
33 | template<> double Bu::tfloor( double x ) | ||
34 | { | ||
35 | return floor( x ); | ||
36 | } | ||
37 | |||
38 | template<> long double Bu::tfloor( long double x ) | ||
39 | { | ||
40 | return floorl( x ); | ||
41 | } | ||
42 | |||
43 | template<> float Bu::tpow( float x, float y ) | ||
44 | { | ||
45 | return powf( x, y ); | ||
46 | } | ||
47 | |||
48 | template<> double Bu::tpow( double x, double y ) | ||
49 | { | ||
50 | return pow( x, y ); | ||
51 | } | ||
52 | |||
53 | template<> long double Bu::tpow( long double x, long double y ) | ||
54 | { | ||
55 | return powl( x, y ); | ||
56 | } | ||
57 | |||
13 | Bu::Formatter::Formatter( Stream &rStream ) : | 58 | Bu::Formatter::Formatter( Stream &rStream ) : |
14 | rStream( rStream ), | 59 | rStream( rStream ), |
15 | bTempFmt( false ), | 60 | bTempFmt( false ), |