mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 04:39:17 +00:00
rogueviz::flocking:: change simulation precision
This commit is contained in:
parent
50a86d1e88
commit
ad2721a078
@ -85,7 +85,12 @@ namespace flocking {
|
|||||||
printf("done\n");
|
printf("done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int precision = 10;
|
||||||
|
|
||||||
void simulate(int delta) {
|
void simulate(int delta) {
|
||||||
|
while(delta > precision && delta < 100 * precision) {
|
||||||
|
simulate(precision); delta -= precision;
|
||||||
|
}
|
||||||
ld d = delta / 1000.;
|
ld d = delta / 1000.;
|
||||||
using namespace hyperpoint_vec;
|
using namespace hyperpoint_vec;
|
||||||
int N = isize(vdata);
|
int N = isize(vdata);
|
||||||
@ -298,6 +303,11 @@ namespace flocking {
|
|||||||
dialog::editNumber(N, 0, 1000, 1, 20, "", "");
|
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::addSelItem("change geometry", XLAT(ginf[geometry].name), 'g');
|
||||||
dialog::add_action(runGeometryExperiments);
|
dialog::add_action(runGeometryExperiments);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user