1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-17 06:07:12 +00:00

pointing-to-directions now checks for the cell which is the most towards the given direction

This commit is contained in:
Zeno Rogue
2019-08-24 19:03:42 +02:00
parent 96d7496043
commit 50052f27f5
3 changed files with 9 additions and 6 deletions

View File

@@ -7246,9 +7246,10 @@ EX void precise_mouseover() {
if(WDIM == 3) {
mouseover2 = mouseover = viewcenter();
ld best = HUGE_VAL;
hyperpoint h = direct_exp(lp_iapply(ztangent(1)), 100);
hyperpoint h = direct_exp(lp_iapply(ztangent(0.01)), 100);
forCellEx(c1, mouseover2) {
ld dist = hdist(tC0(ggmatrix(c1)), h);
hyperpoint h1 = tC0(ggmatrix(c1));
ld dist = geo_dist(h1, h, iTable) - geo_dist(C0, h1, iTable);
if(dist < best) mouseover = c1, best = dist;
}
return;