author | sandman <sandman> | 2002-05-23 20:09:42 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-05-23 20:09:42 (UTC) |
commit | 582f7e6b7da49b90d2cfccd638bccd4ca279da37 (patch) (unidiff) | |
tree | 703fb12864b2efa611a280b15890a0b94530dc35 | |
parent | 343f008ab9a6905ff6f9c953279e84cc581ea8b6 (diff) | |
download | opie-582f7e6b7da49b90d2cfccd638bccd4ca279da37.zip opie-582f7e6b7da49b90d2cfccd638bccd4ca279da37.tar.gz opie-582f7e6b7da49b90d2cfccd638bccd4ca279da37.tar.bz2 |
Removed unused operator<<(ostream&)
-rw-r--r-- | noncore/unsupported/qpdf/fixed.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/fixed.h b/noncore/unsupported/qpdf/fixed.h index e42aea0..d073421 100644 --- a/noncore/unsupported/qpdf/fixed.h +++ b/noncore/unsupported/qpdf/fixed.h | |||
@@ -159,31 +159,33 @@ template <unsigned int SH> inline long int lrint ( const fixed<SH> &f ) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | template <unsigned int SH> inline fixed<SH> fabs ( const fixed<SH> &f ) | 161 | template <unsigned int SH> inline fixed<SH> fabs ( const fixed<SH> &f ) |
162 | { | 162 | { |
163 | return ( f. m_f < 0 ) ? fixed<SH> ( -f. m_f, true ) : f; | 163 | return ( f. m_f < 0 ) ? fixed<SH> ( -f. m_f, true ) : f; |
164 | } | 164 | } |
165 | 165 | ||
166 | // roughly from QPE / qmath.h | 166 | // roughly from QPE / qmath.h |
167 | template <unsigned int SH> inline fixed<SH> sqrt ( const fixed<SH> &f ) | 167 | template <unsigned int SH> inline fixed<SH> sqrt ( const fixed<SH> &f ) |
168 | { | 168 | { |
169 | if ( f. m_f <= 0 ) | 169 | if ( f. m_f <= 0 ) |
170 | return fixed<SH> ( 0, true ); | 170 | return fixed<SH> ( 0, true ); |
171 | 171 | ||
172 | fixed<SH>::fix_t a0 = 0; | 172 | fixed<SH>::fix_t a0 = 0; |
173 | fixed<SH>::fix_t a1 = f. m_f; // take value as first approximation | 173 | fixed<SH>::fix_t a1 = f. m_f; // take value as first approximation |
174 | 174 | ||
175 | do { | 175 | do { |
176 | a0 = a1; | 176 | a0 = a1; |
177 | a1 = ( a0 + fixed<SH>::div ( f. m_f, a0 )) >> 1; | 177 | a1 = ( a0 + fixed<SH>::div ( f. m_f, a0 )) >> 1; |
178 | } while ( abs ( fixed<SH>::div ( a1 - a0, a1 )) > 1 ); | 178 | } while ( abs ( fixed<SH>::div ( a1 - a0, a1 )) > 1 ); |
179 | 179 | ||
180 | return fixed<SH> ( a1, true ); | 180 | return fixed<SH> ( a1, true ); |
181 | } | 181 | } |
182 | 182 | ||
183 | #if 0 // no std::ostream needed in OPIE | ||
183 | template <unsigned int SH> inline std::ostream &operator << ( std::ostream &o, const fixed<SH> &f ) | 184 | template <unsigned int SH> inline std::ostream &operator << ( std::ostream &o, const fixed<SH> &f ) |
184 | { | 185 | { |
185 | o << double( f ); | 186 | o << double( f ); |
186 | return o; | 187 | return o; |
187 | } | 188 | } |
189 | #endif | ||
188 | 190 | ||
189 | #endif | 191 | #endif |