mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +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");
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user