1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-25 06:33:19 +00:00

rogueviz::flocking:: change simulation precision

This commit is contained in:
Zeno Rogue 2018-11-18 17:31:17 +01:00
parent 50a86d1e88
commit ad2721a078

View File

@ -85,7 +85,12 @@ namespace flocking {
printf("done\n");
}
int precision = 10;
void simulate(int delta) {
while(delta > precision && delta < 100 * precision) {
simulate(precision); delta -= precision;
}
ld d = delta / 1000.;
using namespace hyperpoint_vec;
int N = isize(vdata);
@ -298,6 +303,11 @@ namespace flocking {
dialog::editNumber(N, 0, 1000, 1, 20, "", "");
});
dialog::addSelItem("precision", its(precision), 'p');
dialog::add_action([]() {
dialog::editNumber(N, 0, 1000, 1, 10, "", "smaller number = more precise simulation");
});
dialog::addSelItem("change geometry", XLAT(ginf[geometry].name), 'g');
dialog::add_action(runGeometryExperiments);