racing:: speedometer

This commit is contained in:
Zeno Rogue committed 2019-09-12 22:50:05 +02:00
1 parent 3d08d359ee
commit d864c8cc1e
4 files changed
+13 -2

No files matched your search

+7
View File
@@ -34,6 +34,13 @@ string fts(ld x, int prec) {
return ss.str();
}
string fts_fixed(ld x, int prec) {
std::stringstream ss;
ss.precision(prec);
ss << std::fixed << x;
return ss.str();
}
bool scan(fhstream& hs, int& i) { return fscanf(hs.f, "%d", &i) == 1; }
bool scan(fhstream& hs, color_t& c) { return fscanf(hs.f, "%x", &c) == 1; }
bool scan(fhstream& hs, ld& x) { return fscanf(hs.f, "%lf", &x) == 1; }