1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-01 13:01:22 +00:00

nicer boundaries for grid on disksize

This commit is contained in:
Zeno Rogue
2025-10-16 20:59:52 +02:00
parent 718fbcd895
commit d3b5f2641b
2 changed files with 9 additions and 1 deletions

View File

@@ -429,6 +429,12 @@ EX bool is_in_disk(cell *c) {
return *it == c;
}
EX int disk_index(cell *c) {
auto it = lower_bound(all_disk_cells_sorted.begin(), all_disk_cells_sorted.end(), c);
if(it == all_disk_cells_sorted.end() || *it != c) return isize(all_disk_cells_sorted);
return it - all_disk_cells_sorted.begin();
}
bool sierpinski3(gp::loc g) {
int x = g.first;
int y = g.second;