1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-05 11:57:58 +00:00

param_matrix

This commit is contained in:
Zeno Rogue
2023-08-08 17:20:39 +02:00
parent c914bf86e0
commit a13ba9bdbe
5 changed files with 139 additions and 22 deletions

View File

@@ -442,6 +442,13 @@ EX shiftpoint kz(shiftpoint h) {
return h;
}
EX bool scan(shstream& hs, ld& val) {
int npos;
int qty = sscanf(hs.s.c_str() + hs.pos, "%lf%n", &val, &npos);
if(qty == 1) { hs.pos += npos; return true; }
return false;
}
#if HDR
template<class T> vector<T> kz(vector<T> v) {
for(auto& el: v) el = kz(el);