mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-13 23:18:16 +00:00
hybrid::fixed precise_mouseover
This commit is contained in:
parent
85ea29e2df
commit
0785d970f1
14
graph.cpp
14
graph.cpp
@ -7271,6 +7271,20 @@ EX void precise_mouseover() {
|
||||
mouseover2 = mouseover = viewcenter();
|
||||
ld best = HUGE_VAL;
|
||||
hyperpoint h = direct_exp(lp_iapply(ztangent(0.01)), 100);
|
||||
|
||||
if(hybri) {
|
||||
while(true) {
|
||||
ld d1 = geo_dist(C0, tC0(ggmatrix(mouseover2)), iTable);
|
||||
cell *nxt = NULL;
|
||||
forCellEx(c1, mouseover2) {
|
||||
ld d2 = geo_dist(C0, tC0(ggmatrix(c1)), iTable);
|
||||
if(d2 < d1) d1 = d2, nxt = c1;
|
||||
}
|
||||
if(!nxt) break;
|
||||
mouseover2 = nxt;
|
||||
}
|
||||
}
|
||||
|
||||
forCellEx(c1, mouseover2) {
|
||||
hyperpoint h1 = tC0(ggmatrix(c1));
|
||||
ld dist = geo_dist(h1, h, iTable) - geo_dist(C0, h1, iTable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user