49 float getFloat(QTextStream &_source)
54 float highPart = 0.0f;
62 QString::Iterator it = rawNumber.begin();
63 QString::Iterator end = rawNumber.end();
64 if(*it == QLatin1Char(
'-'))
77 highPart += it->digitValue();
93 lowPart += it->digitValue();
106 return rawNumber.toFloat();
108 return sign * (highPart + lowPart / std::pow(10.0,n));
111 float getFloat(std::istream &_source)
113 std::string rawNumber;
114 _source >> rawNumber;
117 float highPart = 0.0f;
119 float lowPart = 0.0f;
125 std::string::iterator it = rawNumber.begin();
126 std::string::iterator end = rawNumber.end();
134 for (;it != end;++it)
140 highPart += (int)(*it -
'0');
150 for (;it != end;++it)
156 lowPart += (int)(*it -
'0');
170 std::stringstream converter;
171 converter<<rawNumber;
175 return sign * (highPart + lowPart / std::pow(10.0,n));
178 double getDouble(QTextStream &_source)
181 _source >> rawNumber;
183 double highPart = 0.0f;
185 double lowPart = 0.0f;
191 QString::Iterator it = rawNumber.begin();
192 QString::Iterator end = rawNumber.end();
193 if(*it == QLatin1Char(
'-'))
200 for (;it != end;++it)
206 highPart += it->digitValue();
216 for (;it != end;++it)
222 lowPart += it->digitValue();
235 return rawNumber.toDouble();
237 return sign * (highPart + lowPart / std::pow(10.0,n));