57 float getFloat(QTextStream &_source)
62 float highPart = 0.0f;
70 QString::Iterator it = rawNumber.begin();
71 QString::Iterator end = rawNumber.end();
72 if(*it == QLatin1Char(
'-'))
85 highPart += it->digitValue();
101 lowPart += it->digitValue();
114 return rawNumber.toFloat();
116 return sign * (highPart + lowPart / std::pow(10.0,n));
119 float getFloat(std::istream &_source)
121 std::string rawNumber;
122 _source >> rawNumber;
125 float highPart = 0.0f;
127 float lowPart = 0.0f;
133 std::string::iterator it = rawNumber.begin();
134 std::string::iterator end = rawNumber.end();
142 for (;it != end;++it)
148 highPart += (int)(*it -
'0');
158 for (;it != end;++it)
164 lowPart += (int)(*it -
'0');
178 std::stringstream converter;
179 converter<<rawNumber;
183 return sign * (highPart + lowPart / std::pow(10.0,n));
186 double getDouble(QTextStream &_source)
189 _source >> rawNumber;
191 double highPart = 0.0f;
193 double lowPart = 0.0f;
199 QString::Iterator it = rawNumber.begin();
200 QString::Iterator end = rawNumber.end();
201 if(*it == QLatin1Char(
'-'))
208 for (;it != end;++it)
214 highPart += it->digitValue();
224 for (;it != end;++it)
230 lowPart += it->digitValue();
243 return rawNumber.toDouble();
245 return sign * (highPart + lowPart / std::pow(10.0,n));